Sign inSign up

opcycle/jenkins

By opcycle

•Updated over 3 years ago

Jenkins Docker container image

Image
0

329

opcycle/jenkins repository overview

⁠Jenkins Container Image

Docker Stars Docker Pulls

⁠Docker Images
⁠Environment Variables

When you start the Jenkins image, you can adjust the configuration of the instance by passing one or more environment variables either on the docker-compose file or on the docker run command line. The following environment values are provided to custommize Jenkins:

VariableDefault ValueDescription
JAVA_ARGSConfigure JVM params
⁠Persisting Jenkins data

If you remove the container all your data and configurations will be lost, and the next time you run the image the database will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.

For persistence you should mount a volume at the /opt/jenkins/data path. The above examples define a docker volume namely jenkins_data. The Jenkins application state will persist as long as this volume is not removed.

To avoid inadvertent removal of this volume you can mount host directories as data volumes. Alternatively you can make use of volume plugins to host the volume data.

⁠Run the Service
docker service create --name jenkins \
  -p 8081:8081 \
  -p 50000:50000 \
  -e JAVA_ARGS="-Xms2G -Xmx6G" \
  --mount type=bind,source=/data/jenkins,destination=/opt/jenkins/data \
  opcycle/jenkins:latest

When running Docker Engine in swarm mode, you can use docker stack deploy to deploy a complete application stack to the swarm. The deploy command accepts a stack description in the form of a Compose file.

docker stack deploy -c jenkins-stack.yml jenkins

Compose file example:

version: "3.8"
services:
  jenkins:
    image: opcycle/jenkins:latest
    ports:
      - 8080:8080
      - 50000:50000
     volumes:
      - jenkins_data:/opt/jenkins/data
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      environment:
        - JAVA_ARGS=-Xms2G -Xmx6G

volumes:
  jenkins_data:
    driver: local
    driver_opts:
      type: "none"
      o: "bind"
      device: "/data/jenkins"

⁠Contributing

We'd love for you to contribute to this container. You can request new features by creating an issue⁠, or submit a pull request⁠ with your contribution.

⁠Issues

If you encountered a problem running this container, you can file an issue⁠. For us to provide better support, be sure to include the following information in your issue:

  • Host OS and version
  • Docker version
  • Output of docker info
  • Version of this container
  • The command you used to run the container, and any relevant output you saw (masking any sensitive information)

Tag summary

Content type

Image

Digest

sha256:04b7c8e02…

Size

404.8 MB

Last updated

over 3 years ago

docker pull opcycle/jenkins