Skip to content

Instantly share code, notes, and snippets.

@jdeathe
Last active September 23, 2019 02:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdeathe/2048ed251dce639b5d13e8401a84ef7b to your computer and use it in GitHub Desktop.
Save jdeathe/2048ed251dce639b5d13e8401a84ef7b to your computer and use it in GitHub Desktop.
Docker Compose definition to run a local Jenkins service in a Docker container.
# ------------------------------------------------------------------------------
# Ref: https://docs.docker.com/compose/compose-file/
#
# Install docker for Mac:
# https://www.docker.com/products/docker
#
# docker-compose -p local_jenkins down
# docker-compose -p local_jenkins up -d
# docker-compose -p local_jenkins logs
#
# Use the password from the logs output to access the instance.
# http://localhost:49001/
# ------------------------------------------------------------------------------
version: "2"
volumes:
data-jenkins:
driver: "local"
services:
jenkins:
image: "jenkins:2.19.2"
ports:
- "49001:8080"
restart: "always"
volumes:
- "data-jenkins:/var/jenkins_home"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment