-1

When a docker container crashes and I make a new one, how can I ensure I have the settings from the last one in place? The container I am running contains Jenkins only.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Joe Doe
  • 181
  • 1
  • 1
  • 3

1 Answers1

0

You need to use a volume if you want your configuration changes to be persisted.

In the image I am using as a base (usually jenkins/jenkins:2.75-alpine), the configuration lives under: /var/jenkins_home/workspace

so all I need to do is something like:

docker run -v /path/on/host:/var/jenkins_home jenkins/jenkins:2.75-alpine
iocanel
  • 570
  • 2
  • 2