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 … Read more

How to use sudo inside a docker container?

Normally, docker containers are run using the user root. I’d like to use a different user, which is no problem using docker’s USER directive. But this user should be able to use sudo inside the container. This command is missing. Here’s a simple Dockerfile for this purpose: FROM ubuntu:12.04 RUN useradd docker && echo “docker:docker” … Read more

How do I assign a port mapping to an existing Docker container?

I’m not sure if I’ve misunderstood something here, but it seems like it’s only possible to set port mappings by creating a new container from an image. Is there a way to assign a port mapping to an existing Docker container? 15 s 15 You can change the port mapping by directly editing the hostconfig.json … Read more

Docker how to change repository name or rename image?

I’m trying to change repository name of the image: REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE server latest d583c3ac45fd 26 minutes ago 685.5 MB Hence I want to change the name server to something like myname/server: REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE myname/server latest d583c3ac45fd 26 minutes ago 685.5 MB How can I do … Read more