Questions tagged [linux-containers]

Linux containers (LXC) is an operating system–level virtualization method for running multiple isolated Linux systems (containers) on a single control host.

Linux containers (LXC) is an operating system–level virtualization method for running multiple isolated Linux systems (containers) on a single control host.

https://linuxcontainers.org/

224 questions
870
votes
14 answers

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…
Timur Fayzrakhmanov
  • 17,967
  • 20
  • 64
  • 95
733
votes
15 answers

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?
thasmo
  • 9,159
  • 6
  • 27
  • 32
486
votes
14 answers

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…
drubb
  • 14,533
  • 7
  • 15
  • 11
258
votes
19 answers

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…
pguardiario
  • 53,827
  • 19
  • 119
  • 159
122
votes
6 answers

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…
user859375
  • 3,529
  • 5
  • 21
  • 22
79
votes
10 answers

How to execute MySQL command from the host to container running MySQL server?

I have followed the instruction in https://registry.hub.docker.com/_/mysql/ to pull an image and running a container in which it runs a MySQL server. The container is running in the background and I would like to run some commands. Which is the best…
Mazzy
  • 13,354
  • 43
  • 126
  • 207
69
votes
2 answers

Docker build pull access denied, repository does not exist or may require

I am trying to generate a Docker Image without using Visual Studio. I am in the project folder and I execute from windows 10 admin command line docker build . I can't figure out how to make this work. [+] Building 1.3s (8/9) => [internal] load…
greektreat
  • 2,329
  • 3
  • 30
  • 53
65
votes
1 answer

Docker container and memory consumption

Assume I am starting a big number of docker containers which are based on the same docker image. It means that each docker container is running the same application. It could be the case that the application is big enough and requires a lot of hard…
Michael Belenki
  • 651
  • 1
  • 6
  • 4
60
votes
4 answers

Backup a running Docker container?

Is it possible to backup a running Docker container? Is the export command suitable for doing that?
Slava V
  • 16,686
  • 14
  • 60
  • 63
50
votes
4 answers

Is it possible to share memory between docker containers?

I work on an application with different processes and I'm asked to contain those processes for achieving more isolation. The problem is that the processes share memory with a single "hypervisor" process in order to exchange data (they use classic…
Manuel Durando
  • 1,493
  • 3
  • 19
  • 30
35
votes
1 answer

Does a docker container have its own TCP/IP stack?

I'm trying to understand what's happening under the hood to a network packet coming from the wire connected to the host machine and directed to an application inside a Docker container. If it were a classic VM, I know that a packet arriving on the…
Manuel Durando
  • 1,493
  • 3
  • 19
  • 30
34
votes
7 answers

Dockerfile: Docker build can't download packages: centos->yum, debian/ubuntu->apt-get behind intranet

PROBLEM: Any build, with a Dockerfile depending on centos, ubuntu or debian fails to build. ENVIRONMENT: I have a Mac OS X, running VMWare with a guest Ubuntu 14.04, running Docker: mdesales@ubuntu ~ $ sudo docker version Client version:…
Marcello DeSales
  • 21,361
  • 14
  • 77
  • 80
29
votes
2 answers

Start full container in Docker?

According to this github issue it should be possible to start a full container with Upstart, cron etc. with Docker 0.6 or later but how do I do that? I was expecting that docker run -t -i ubuntu /sbin/init would work just like lxc-start -n ubuntu…
esamatti
  • 18,293
  • 11
  • 75
  • 82
27
votes
4 answers

How do I move a docker container's image to a persistent disk?

We have noticed that our containers are taking up a lot of space, one of the reasons for this is the images. We would like to move the images. I know right now they are stored in /var/lib/docker/graph//layer Is there a way to move these to…
dvaini
  • 283
  • 1
  • 3
  • 5
20
votes
5 answers

Docker + Node.js + Windows

What I want: dockerize a Node.js web app (I am on Windows) Windows container docker-compose up gets me this error: Service 'webapp' failed to build: no matching manifest for windows/amd64 in the manifest list entries As far as I understand that is…
019
  • 450
  • 1
  • 4
  • 13
1
2 3
14 15