Questions tagged [docker]

Docker - An open platform for distributed applications for developers and sysadmins.

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud.

1891 questions
165
votes
4 answers

What's the difference between `docker stop` and `docker kill`?

What's the difference between docker stop and docker kill? As far as I know, both will stop a running container. Is it that docker stop attempts to stop the process run inside the container in the correct way, while docker kill will send a kill…
Geert-Jan
  • 1,793
127
votes
8 answers

docker-compose up/down just one container

I have not been able to find a way to up/down just one container in a docker-compose.yml file. I can off-course start and stop a single container, but I cannot make changes to a containers configuration between restarts (environment variables, mount…
103
votes
3 answers

Docker containers have their own kernel or not?

I see that a lot of docker images in the docker repository are made with an Ubuntu base. What does that mean? Does each container bundle a stripped down version of the Linux kernel? Do containers sit on top of their own kernels? But I thought…
stewart99
  • 1,141
32
votes
6 answers

What is my container's IP number using Docker beta for mac?

Previously I was using the Docker toolkit and could use docker-machine inspect to find the IP of the docker machine, in order to view the pages being served by the container within. I have upgraded to the docker beta client (for mac)…
Synesso
  • 561
24
votes
2 answers

What are .dockerenv and .dockerinit?

What are the .dockerenv and .dockerinit files in the root of my container's filesystem? How are they used? Is there any documentation on these files? root@18ceee4f9041:/# ls -al / total 72 drwxr-xr-x. 21 root root 4096 Jan 4 20:45 . drwxr-xr-x. …
19
votes
4 answers

Finding out the veth# interface of a docker container

I have hundreds of containers in various software virtual switches. I would like to know if its possible to find out which vnet# belongs to which docker container. Right now, I am detecting that by watching syslog as each container gets created. In…
17
votes
1 answer

Recursively copy files using docker cp

Does docker truly only support one file-at-a-time copying to/from the host? The only options displayed for docker cp are: $docker cp --help Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|- docker cp [OPTIONS] SRC_PATH|-…
16
votes
2 answers

How to override docker-compose project name and network name

Can we override our project and network name inside docker-compose.yml, i.e. without using flag or environment variable?
ntviet18
  • 287
14
votes
4 answers

How to upgrade software (e.g. PostgreSQL) running in a Docker container?

When using the base PostgreSQL Docker image, you choose a PostgreSQL version, spin up a container and you're running. Great! But what the the correct/best way to upgrade to a newer version of PostgreSQL in the future?
12
votes
3 answers

Remove exposed port from docker

I'm creating a container from an image that had a published port (3000). I want to publish a new port (3030) and only this one, if I use the --publish 3030:3030 I end up with both ports published (3000 and 3030). Is it possible to somehow unpublish…
Olivier
  • 1,489
10
votes
3 answers

Can I add an additional docker entrypoint script?

How does ENTRYPOINT to a Docker container work exactly? I have a base docker image which has an ENTRYPOINT script and I am building another image on top of that which has one more ENTRYPOINT script. When I run the image will both the ENTRYPOINT…
10
votes
1 answer

Pipe docker logs -f into jq

I'm trying to pipe json logs from docker into jq. It works fine if I use: docker logs container_id 2>&1 | jq '.' But, if I try to tail it, it gets stuck. docker logs -f container_id 2>&1 | jq '.' While tailing by itself does work: docker logs -f…
eran
  • 261
10
votes
1 answer

How to increase terminal dimensions in docker

I am new to using docker. A pre-configured image has been booted and comes up successfully. How can the terminal dimensions be changed - let us say to 60 lines by 120 characters - from the current (small) default?
9
votes
2 answers

How can I stop a docker container running sleep?

sleep is a stand-in for most complex processes of course. This Dockerfile (as you can see using the exec form so that there is only one process running and no children of bash): FROM busybox CMD ["/bin/sleep", "100000"] creates an uninterruptible…
7
votes
4 answers

Docker, Detect Operating System of Host

I'm creating a development setup for a web app with Docker. We have developers running in Windows, Mac, and Linux. Everyone will be using Linux containers, but there are still issues that only affect Windows users. I'm not looking to run the…
1
2 3
10 11