Docker - official Volumes Support

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Docker - official Volumes Support

mwiora
Hi folks,

actually I want to run Artifcatory (latest) using the provided docker image.
As I saw there is currently no really "efficient" persistent storage option.

Either I have to run it without persistent storage options or I have to "resume" an existing image each time.

Reg. http://www.jfrog.com/confluence/display/RTF/Running+with+Docker the "-v" switch doesn't work, what in fact is happening.

Is this subject to be changed in the future? What would be the alternatives?

cheers,
Matthias
Reply | Threaded
Open this post in threaded view
|

Re: Docker - official Volumes Support

denebeim
The -v switch works fine.  What doesn't work is to map to a local directory i.e.

-v $ARITFACTORY_HOME/etc is good, but -v $ARITFACTORY_HOME/etc:$(pwd)

The problem is due to artifactory needing a file that's in /etc to start the first time.  The way docker works is if you give the first -v option above the files that are on the image originally are placed in the volume.  The second case does not do this so you end up with artifactory not having access to its files.

A workaround would be doing something like:

docker run --name temp <artifactory image> /bin/false
docker cp temp:/etc/opt/jfrog/artifactory .
cd artifactory
docker run ... with all the -v options ...

I hope that helps
Jay
Reply | Threaded
Open this post in threaded view
|

Re: Docker - official Volumes Support

mwiora
Hi denebeim,

thank you for your reply!
problem seems to be fixed in the current version.

Cheers,
Matthias