Modifying or adding volumes

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.

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! https://github.com/kitematic/kitematic/issues/376

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,
Jeff

1 Like

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 (github.com/docker-library/drupal) I wish to add the VOLUME directive to is here: github.com/kyleskrinak/drupal. I will greatly appreciate reading how I should change the Dockerfile so that I can access the container’s directory via Kitematic.

Thanks, Kyle

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?

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?

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?

1 Like

People at Docker don’t realize how much frustration this causes for newbies. I wasted hours to figure this out and it still isn’t possible to add volumes in 2019. Great way to start learning Docker, thanks!

1 Like