How can I backup a Docker-container with its data-volumes?

I’ve been using this Docker-image tutum/wordpress to demonstrate a WordPress website. Recently I found out that the image uses volumes for the MySQL-data. So the problem is this: If I want to backup and restore the container I can try to commit an image, and then later delete the container, and create a new container […]

Exposing a port on a live Docker container

I’m trying to create a Docker container that acts like a full-on virtual machine. I know I can use the EXPOSE instruction inside a Dockerfile to expose a port, and I can use the -p flag with docker run to assign ports, but once a container is actually running, is there a command to open/map […]

What is the difference between save and export in Docker?

I am playing around with Docker for a couple of days and I already made some images (which was really fun!). Now I want to persist my work and came to the save and export commands, but I don’t fully understand them. What is the difference between save and export in Docker?

Managing remote docker machines from multiple development machines

Can the docker machines created from one developer workstation using docker-machine commands, be managed from another workstation. I am not looking for a solution involving docker swarm, but just docker machine. From my understanding when docker-machine creates the machine on a remote environment like AWS EC2, it creates keys and certs which are then used […]

Cannot install packages inside docker Ubuntu image

I installed Ubuntu 14.04 image on docker. After that, when I try to install packages inside the ubuntu image, I’m getting unable to locate package error: apt-get install curl Reading package lists… Done Building dependency tree Reading state information… Done E: Unable to locate package curl How to fix this error?

Can't connect to docker from docker-compose

I installed docker-machine 0.1.0 and docker-compose 1.1.0 on Mac OS 10.8.5.Docker-machine is running normally and able to connect by docker-machine ssh. $ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM dev * virtualbox Running tcp:// However can’t connect from docker-compose. $ docker-compose up Couldn’t connect to Docker daemon at http+unix://var/run/docker.sock – is it running? If […]

Conditional COPY/ADD in Dockerfile?

Inside of my Dockerfiles I would like to COPY a file into my image if it exists, the requirements.txt file for pip seems like a good candidate but how would this be achieved? COPY (requirements.txt if test -e requirements.txt; fi) /destination … RUN if test -e requirements.txt; then pip install -r requirements.txt; fi or if […]

Updating PATH environment variable permanently in Docker container

I tried adding to the PATH in the files ~/.profile and /etc/profile as follow. PATH = $PATH:/required/path However, it does not work. Then I tried with adding the line show, which did not work either. export PATH It did not work even after restarting the container and the host both.

Can I use mem_limit in docker-compose? and How?

mem_limit is supported by docker-compose? How can I test it? I have a following docker-compose.yml repository: image: myregistry/my_nginx_image mem_limit: 60m volumes: – /etc/localtime:/etc/localtime ports: – “80:80” How can I prove that the container actually does not exceed 60 mb of RAM? I am using: docker 1.3.1 docker-compose 1.1.0

How to dockerize maven project? and how many ways to accomplish it?

I am new to Docker, and don’t know how to run a java project with maven even though i have read many documents and tried many methods. Should i build the image using Dockerfile? What is the commands like when it is to run the maven project in the host with Dockerfile?

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.