Newer
Older
jenkins / docker-compose.yml
version: "2.1"

services:
  master-jenkins:
    image: jenkins/jenkins:lts
    mem_limit: 2g
    environment:
      - JAVA_OPTS="-Djava.util.logging.config.file=/var/jenkins_home/log.properties ${JENKINS_ADDITIONAL_JAVA_OPTS}"
      - TZ=${TZ}
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - ./data:/var/jenkins_home
    restart: always
    ports:
      - "${JENKINS_HTTP_BIND:-127.0.0.1}:${JENKINS_HTTP_PORT:-8080}:8080"
      - "${JENKINS_API_BIND:-127.0.0.1}:${JENKINS_API_PORT:-50000}:50000"