Questions tagged [docker]

Docker is an application to create containers for applications.

The main goal of the Docker containers is share applications.

Target application and environment which is needed during the application works packs in image. Often, RAW image is directory hierarchy with needed files that packed in tar archive.

When target image is starting it is being contained (container).

When image arrived to the Docker, then Docker puts it in own storage register in place that called bottom layer. When container of specific image is working, then Docker save all filesystem changes from it to own register too, but in place that called upper layer. If need to save container state to the image, then Docker make upper layer persistent and in future container starting Docker merge lower and upper layer (over AUFS, OverlayFS) during the container are being started. Therefore new images effectively use disk space.

There are huge count of ready containers available in Docker HUB.

Official Docker documentation.

1744 questions
97
votes
5 answers

Extract file from docker image?

I'd like to extract a file from a Docker image without having to run the image. The docker save option is not currrently a viable option for me as it's saving too huge of a file just to un-tar a specific file.
BlakBat
  • 1,061
41
votes
7 answers

How to determine Docker image size before being pulled?

We can search for available image files on the docker website like this: https://index.docker.io/search?q=ubuntu How can I tell what the download size(s) will be prior to pulling? docker.io pull [image]
Sepero
  • 1,599
28
votes
3 answers

Docker overrides my /etc/resolv.conf file inside containers

I want to set my resin/rpi-raspbian:jessie container's /etc/resolv.conf to: nameserver 208.67.222.222 nameserver 208.67.220.220 My Dockerfile has the following line: ADD resolv.conf /etc/resolv.conf This added file contains the correct…
26
votes
3 answers

Docker: create a persistent volume in a specific directory

I need to create a persistent volume for Docker. The volume must be named extra-addons and located in /mnt/. I run this command: sudo docker volume create /mnt/extra-addons I got this error message: Error response from daemon: create…
22
votes
5 answers

docker: Error response from daemon: failed to create endpoint - failed to add host

Docker used to work, but now it gives an error whenever running a container: docker: Error response from daemon: failed to create endpoint - failed to add host Example: docker run -it debian Resulting Error: docker: Error response from daemon:…
Machiavelli
  • 321
  • 1
  • 2
  • 5
18
votes
2 answers

Why does Docker need root privileges?

I am learning Docker, and I quite like it. However, I don't understand, why does docker need root privileges for making containers, reading logs, and so on. I have read some articles like this one https://docs.docker.com/articles/security/ but all I…
Karel Bílek
  • 1,951
11
votes
4 answers

Can't run script file in docker, no such file or directory

I have a Dockerfile like this: FROM alpine COPY setup.sh /setup.sh CMD ["/setup.sh"] My setup.sh is like this: #!/bin/sh echo "hello world" Tried to run these commands: docker build . docker run --name test 61230f9f45ad Error returned is…
Cris
  • 213
10
votes
2 answers

Is installing Docker itself risky? - the possibility of creating docker groups

In figuring out how to manage python environments for projects, I am considering using Docker containers. I became aware the Debian wiki warns, like other online sources, about the risk of Docker groups. But I am less certain: Does the mere…
Johan
  • 399
10
votes
1 answer

Is there a trick to build docker container with privilege option?

I have to add some rule to iptables, in the build process it give me an error because i need privilege so is there any way to get around it, i know that there no privilege option in build, or can i build and image without run it ?
9
votes
2 answers

Do `docker container rm` and `docker container kill` effectively achieve the same?

From manpages: docker container rm will remove one or more containers from the host node. The container name or ID can be used. This does not remove images. docker container kill: The main process inside each container specified will be sent…
Tim
  • 101,790
6
votes
3 answers

too many links in /var/lib/docker error while building Docker container

Someone suggested on SO to post here. Reposting from https://stackoverflow.com/questions/59024392/too-many-links-in-var-lib-docker-error-while-building-docker-container Trying to run docker-compose build and getting the following error: ERROR:…
thehme
  • 161
6
votes
2 answers

Docker Container Volumes Synced Locally

I am trying to run a local Docker Registry with a synchronized storage with my Dropbox so I can have access to built VMs without having to rebuild the images if I move to a different work station. I have launched the Registry with the…
5
votes
1 answer

How to specifiy a static IP address with docker-compose.yml version 3?

Someone asked the same question here - the problem is that it relates to version 2 which I am not using. Is it meanwhile possible to define a static subnet and a static IP address for each started container with docker-compose within the…
manifestor
  • 2,473
5
votes
2 answers

What's the difference between ADD and COPY instructions in the Dockerfile

Isn't clear to me, why there are two instructions for copying files into the Docker image described in the Dockerfile reference. There are ADD and COPY and they seem pretty similar to me. Is there a practical difference between them? If not, which…
4
votes
0 answers

Why is my /var/lib/docker dir huge?

I'm a backend software developer, and we use docker at work. On my work machine, if I: Stop and delete all docker containers (even the stopped ones only visible with -a) Delete all docker images (even the intermediate ones only visible with…
John
  • 467
1
2 3
8 9