This is my blog where I hope to post information about what I am doing technically and what my family is up to. I hope you enjoy

Thursday, January 2, 2020

Docker Commands

Start Container


#  start container in interactive mode
> docker run -it    /bin/bash

# Break out of container without stopping
> Ctl-P, Ctl-Q

# start docker container in daemon mode
> docker run -it -d --name 'delaney'   bash
> docker attach delaney
# Another option to attach
> docker exec -it delaney bash


# start nginx in docker container
> docker run -d -P nginx:latest  --name delaney
> docker inspect delaney | grep IPAddress
> curl

# start SonarQube in docker container
docker run -d --name sonarqube -p 9000:9000 sonarqube

# start Jenkins Server in docker container
docker run -ti --name receiver-jenkins -p 8080:8080 -p 50000:50000 -v jenkins-data:/var/jenkins_home jenkins/jenkins:lts
Layout-->Edit HTML -->