Docker Community Forums

Share and learn in the Docker community.

Modifying or adding volumes

(Paxmanchris) #1

I installed Kitematic on my mac and installed tutum/lamp. The first issue I faced was the mysql server was not loading. After removing the volume configuration for /var/lib/mysql, I got it to work.

Now I want to add a new volume to the image that maps to the /var/www directory (I don’t want to use git as they suggested). Normally I would define this in the Dockerfile, but there seems to be no way to do this in the Kitematic interface. Im new to the whole docker then ever since I started playing around with Discourse, so excuse me in advance if I am just missing some fundamentals.

(Jmorgan) #2

Hi there @paxmanchris

There’s currently no way in Kitematic to add a volume for a specific directory unless it was defined in the Dockerfile as a VOLUME directive. That said, I’ve created a new ticket for this!

In this case, it looks like the Dockerfile for tutum/lamp doesn’t have this volume defined. Sorry! One solution in the meantime is to fork their github repo, set up automated builds on DockerHub and then use Kitematic to run this new image.

Hope this helps,

(Kyle Skrinak) #3

This caught my eye as the solution seems trivial. However, as I experienced, simply adding a VOLUME directive to the Dockerfile (and all the other docker hub autobuild stuff) breaks the docker container.

This ticket suggests that you also need to include an EXPOSE and ENV directive, though I’m unclear which. In my case, I’ve added:

VOLUME /var/www/html

To this Dockerfile, found here. All these seems to do, however, is empty that directory’s contents by the end of the build process.

My fork of the container ( I wish to add the VOLUME directive to is here: I will greatly appreciate reading how I should change the Dockerfile so that I can access the container’s directory via Kitematic.

Thanks, Kyle

(Jplesko) #4

I too just noticed this and was a little disappointed. Adding a volume to the Docker file is fine and good if you are building your own containers, but it is not practical if you are using containers from Docker Hub. Is there any eta on when this will be fixed?

(Pbpayal) #5

I am also trying to run a biocontainer which I downloaded from Quay. How can I map the local files to Volumes in Kitematic ? Is there a resolution?

(Ttringle) #6

Three years and Kitematic still doesn’t have a way to do this? Are new features ever going to be added? Why create this app if it will not have glaringly obvious features added within 2 years?