Skip to content

Instantly share code, notes, and snippets.

@bhalothia
Last active January 18, 2022 15:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhalothia/3fc8ccd96661a173ce9a413a22c31403 to your computer and use it in GitHub Desktop.
Save bhalothia/3fc8ccd96661a173ce9a413a22c31403 to your computer and use it in GitHub Desktop.
# Commands used in Setting up Jenkins 2.0 on Docker
# To create jenkins-test machine
docker-machine create --driver virtualbox jenkins-test
# To check the ip allocated to the jenkins-test machine
docker-machine ip jenkins-test
# To map the ip address to the jenkins-test alias
vi /etc/hosts
# To configure the shell to run docker commands
docker-machine env jenkins-test
# To pull the Jenkins 2.0 image
docker pull jenkins:2.0
# To run a container out of Jenkins 2.0 image and mapping HTTP and JNLP ports
docker run -p 8080:8080 -p 50000:50000 jenkins:2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment