Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

persistent store is not declared in Dockerfile #9

Closed
alex-leonhardt opened this issue Sep 24, 2014 · 4 comments
Closed

persistent store is not declared in Dockerfile #9

alex-leonhardt opened this issue Sep 24, 2014 · 4 comments

Comments

@alex-leonhardt
Copy link
Contributor

the -v /home/jenkins_home won't work as it's not made available as volume

@tkambler
Copy link

+1 - Cannot manage to make this work. Show stopper.

@michaelneale
Copy link
Member

This is by design - docker official image repos suggest NOT placing volume in the Dockerfile - as it can't be removed by dependent dockerfiles. You can have a Dockerfile with FROM jenkins at the top - and then VOLUME as needed.

However - using -v /local/path:/internal/path is a different issue (the PR) - I get the feeling there is general confusion with how docker works. Putting -v /volume/here is the same as VOLUME in dockerfile (wthout the limitations) - which is different again to -v /host/path:/volume/here.

michaelneale added a commit that referenced this issue Sep 26, 2014
@dkapanidis
Copy link

Hi,

can you put a reference to the suggestion of not placing volumes in the Dockerfiles?

It's true, volumes can't be removed by dependent Dockerfiles, but that's by design. I can't think of a use case that it is necessary to keep the data inside a living jenkins container, that would break any possible upgrading patterns.

In general, most official repos do have a volume defined, so that the data are stored separately from the container. I put some examples below:

my 2cents

@michaelneale
Copy link
Member

It was in an email from official image approvers.

If those other ones are doing it, then we should here too, I agree.

The main problem is that people aren't reading the docs on docker volume
management.

On Saturday, September 27, 2014, spiddy notifications@github.com wrote:

Hi,

can you put a reference to the suggestion of not placing volumes in the
Dockerfiles?

It's true, volumes can't be removed by dependent Dockerfiles, but that's
by design. I can't think of a use case that it is necessary to keep the
data inside a living jenkins container, that would break any possible
upgrading patterns. (

In general, most official repos do have a volume defined, so that the data
are stored separately from the container. I put some examples below:

my 2cents


Reply to this email directly or view it on GitHub
#9 (comment)
.

Michael D Neale
home: www.michaelneale.net
blog: michaelneale.blogspot.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants