Questions tagged [docker]

Docker is an open source project that automates the deployment of applications inside software containers.

Filter by
Sorted by
Tagged with
244
votes
16answers
260k views

How can I use environment variables in Nginx.conf

I have a docker container running Nginx, that links to another docker container. The host name and IP address of the second container is loaded into the Nginx container as environment variables on ...
200
votes
10answers
334k views

Docker Container time & timezone (will not reflect changes)

Where do Docker containers get their time information? I've created some containers from the basic ubuntu:trusty image, and when I run it and request 'date', I get UTC time. For awhile I got around ...
189
votes
4answers
159k views

How to remove an image tag in Docker without removing the image itself?

Let's say I want to tag a Docker image, and make a typo. How do I remove the tag without removing the image itself? Neither the manpages nor the Docker documentation mention removing tags. docker tag ...
161
votes
3answers
225k views

How can I override CMD when running a docker image?

I want to inspect a docker image created by someone else with both an entrypoint and cmd specified, for example: ENTRYPOINT ["/usr/sbin/apache2ctl"] CMD ["-D", "FOREGROUND"] I currently do: docker ...
133
votes
5answers
36k views

How to handle security updates within Docker containers?

When deploying applications onto servers, there is typically a separation between what the application bundles with itself and what it expects from the platform (operating system and installed ...
127
votes
10answers
89k views

Can you run Docker natively on the new Windows 10 (Ubuntu) bash userspace?

My understanding was that the primary limitation of running docker on other OSs was the Linux Network containers that made it possible. (Certainly for Macs). Recently Microsoft announced a beta of a ...
120
votes
3answers
148k views

How do I auto-start docker containers at system boot?

What is a good way to automatically start docker containers when the system boots up? Is there a preferred way to do this on Ubuntu 14.04? I've used supervisord in the past to auto start web apps. ...
118
votes
5answers
201k views

How can I debug a docker container initialization?

I had an issue with a container, even though it builds perfectly it does not properly start. The cause is a workaround I've added to the Dockerfile (for having a self-configured /etc/hosts routing) ...
108
votes
3answers
98k views

Can Mac OS X be run inside Docker? [closed]

Can Mac OS X be run inside Docker? If so, any suggestion as to how? And would it be running headless, or there would be a possibility to connect to the GUI remotely?
106
votes
3answers
35k views

Why do we use a OS Base Image with Docker if containers have no Guest OS?

I've just started to study Docker and there's something that's being quite confusing for me. As I've read on Docker's website a container is different from a virtual machine. As I understood a ...
73
votes
3answers
140k views

Why isn't ifconfig available in Ubuntu Docker container?

With the base ubuntu:12.04, ifconfig is not available in the container, though the ip command is available, why is this? and, how to get ifconfig in the container?
62
votes
4answers
85k views

Make a Docker application write to stdout

I'm deploying a 3rd-party application in compliance with the 12 factor advisory, and one of the points tell that application logs should be printed to stdout/stderr: then clustering software can ...
61
votes
6answers
46k views

Is it possible to rerun kubernetes job?

I have the following Kubernetes Job configuration: --- apiVersion: batch/v1 kind: Job metadata: name: dbload creationTimestamp: spec: template: metadata: name: dbload spec: ...
61
votes
5answers
178k views

Multiple commands in Docker CMD directive

Not understanding what is happening when I try to execute two commands at runtime via CMD directive in `Dockerfile. I assumed that this should work: CMD ["/etc/init.d/nullmailer", "start", ";", "/usr/...
60
votes
2answers
93k views

Downloading docker image for transfer to non-internet-connected machine

I'm working in an office where my laptop is internet-connected, but tightly controlled. I am not allowed to install unauthorized software onto it. My development workstation is mine to do with as I ...
59
votes
5answers
50k views

Removing Docker data volumes?

The official Docker documentation mentions that I need to run docker rm -v containername to specifically remove a data volume. But what do you do if you already removed all the containers referencing ...
58
votes
7answers
121k views

How to specify hostname for the running container?

I'm having trouble setting the hostname on a running docker container. I'm also having trouble understanding how to specify hostname after the image is started. I started a container from an image I ...
57
votes
6answers
48k views

How to install tzdata on a ubuntu docker image?

I have the following line in the Dockerfile. RUN apt-get install -y tzdata When I run it, it asks for my input. After I provided my input, it hung there. Does anybody know how to solve this problem? ...
57
votes
4answers
19k views

Relationship between Vagrant, Docker, Chef and OpenStack (or similar products)?

I am a web developer, but I am also interested in a few administrative tasks. Hence, the new move from pure administration to dev-ops comes handy for me. Anyway, I have some problems to put a few ...
55
votes
11answers
117k views

Docker containers can't resolve DNS on Ubuntu 14.04 Desktop Host

I'm running into a problem with my Docker containers on Ubuntu 14.04 LTS. Docker worked fine for two days, and then suddenly I lost all network connectivity inside my containers. The error output ...
54
votes
1answer
26k views

Pros and cons of using Windows containers instead of Linux containers for Docker?

I'm installing Docker for Windows (CE) on Windows 10 and the first screen asks me: [  ] Use Windows containers instead of Linux containers (this can be changed after installation) This ...
51
votes
4answers
131k views

The right way to keep docker container started when it used for periodic tasks

I have docker container with installed and configured software. There is no any programm supposed to be started/runned all the time. What I want - its ability to start some command depending on ...
49
votes
5answers
98k views

Why can't I cd to a directory with docker run?

I need to run an application from a specific directory. $ sudo docker run -P ubuntu/decomposer 'cd /local/deploy/decomposer; ./decomposer-4-15-2014' 2014/10/09 21:30:03 exec: "cd /local/deploy/...
46
votes
4answers
86k views

How is Docker Compose version 2 “volumes” syntax supposed to look?

With Docker Compose v1.6.0+, there now is a new/version 2 file syntax for the docker-compose.yml file. The changes include a separate top level key named volumes. This allows to "centralize" volume ...
46
votes
4answers
114k views

failed to get D-Bus connection: Operation not permitted

I'm trying to list services on my CentOS image running in Docker using systemctl list-units but I get this error message: Failed to get D-Bus connection: Operation not permitted Any suggestions ...
45
votes
2answers
29k views

How to use docker secrets without a swarm cluster?

Currently we im a running application on a single docker container, the application needs all sorts of sensitive data to be passed as environments variables, Im putting those on the run command so ...
44
votes
12answers
106k views

Docker COPY issue - “no such file or directory”

In my Dockerfile I have the following 'COPY" statement: # Copy app code COPY /srv/visitor /srv/visitor It should go without saying that in my host system, under the "/srv/visitor" directory, there ...
40
votes
2answers
31k views

When building from Dockerfile, Debian/Ubuntu package install debconf Noninteractive install not allowed

I've set the following environment so that no question/dialog is asked during apt-get install: ENV DEBIAN_FRONTEND noninteractive # export DEBIAN_FRONTEND="noninteractive" Which is equivalent to: ...
37
votes
4answers
71k views

How to install Docker on AWS EC2 instance with AMI (CE/EE Update)

What is the current way of installing Docker on an AWS EC2 instance running the AMI? There has been an announcement of Docker Enterprise Edition and now I want to know if anything has changed. Until ...
36
votes
7answers
20k views

Update the container of a service in Amazon ECS

What kind of approach is recommended for updating the container of a service which is running in Amazon ECS? The AWS documentation says: "If you have updated the Docker image of your application, you ...
35
votes
3answers
32k views

Writing Apache2 Logs to stdout/stderr?

I'm running Apache2 in a docker container, and want to write nothing to the disk, writing logs to stdout and stderr. I've seen a few different ways to do this (Supervisord and stdout/stderr, Apache ...
35
votes
5answers
41k views

Configuring Docker to not use the 172.17.0.0 range

Due to problems with captive portals and the default Docker IP range I am trying to make Docker use the 198.18.0.0 range, instead of 172.17.0.0, which clashes with the captive portals used on the ...
35
votes
4answers
45k views

How to set system time dynamically in a Docker container

Is there any way to set a Docker containers system time dynamically (at run time) without effecting the host machine? Using hwclock --set --date "Sat Aug 17 08:31:24 PDT 2016" gives the following ...
35
votes
1answer
16k views

What is the point of the docker-proxy process? Why is a userspace tcp proxy needed?

I have noticed that there is docker-proxy process running for each published port. What is the purpose of this process? Why is a user space tcp proxy needed for this? $ ps -Af | grep proxy root ...
34
votes
3answers
24k views

Docker: failed to add the pair interfaces (operation not supported)

After installing Docker, I am getting an error when I try to run the Hello World example: Error response from daemon: Cannot start container ...
34
votes
7answers
35k views

Check is container/service running with docker-compose

I am using the docker-compose. Some commands like up -d service_name or start service_name are returning right away and this is pretty useful if you don't want the containers running to depend on ...
33
votes
2answers
50k views

Which OS is running in my Docker container?

Most of the time, using one of these two, I can tell which OS is running in my Docker container (alpine, centOS, etc) But this time, I can't tell: bash-4.2$ uname -a Linux 6fe5c6d1451c 2.6.32-...
32
votes
2answers
24k views

docker-compose: option to automaticaly remove container after run in docker-compose.yml

The docker-compose run reference states that it has the --rm option to Remove container after run. I want to make this a default run behavior for some of services I specify in docker-compose.yml. ...
31
votes
4answers
34k views

Steps for limiting outside connections to docker container with iptables?

My goal is to limit access to docker containers to just a few public IP addresses. Is there a simple, repeatable process to accomplish my goal? Understanding only the basics of iptables while using ...
31
votes
1answer
56k views

How does “restart: always” policy work in docker-compose?

I have docker compose file with PostgreSQL and my application, like this: version: '3' services: postgresql: image: postgres:9.6.6 ports: - 9932:5432 expose: - "5432" ...
29
votes
5answers
25k views

Mount Docker container contents in host file system

I want to be able to inspect the contents of a Docker container (read-only). An elegant way of doing this would be to mount the container's contents in a directory. I'm talking about mounting the ...
28
votes
7answers
72k views

Clearing/Deleting Docker Logs

On our docker implementation on GCE, we are running out of space on the root file system. Since images themselves are stored on a separate 1TB volume, the images themselves shouldn't be the problem. ...
28
votes
4answers
14k views

Docker daemon doesn't start on boot on CoreOS

I have a vanilla install of CoreOS (835.9.0) and it doesn't start the docker daemon on startup. It only starts when I SSH in and do eg docker ps. How can i make the docker daemon automatically start ...
27
votes
4answers
53k views

How can I run a full OS in a Docker container, without specifying a command?

I'm following the CoreOS Docker Documentation and it mentions starting containers with commands like: docker run someImageName /bin/somebinary Where someImageName is an image. When /bin/somebinary ...
25
votes
4answers
5k views

gcloud docker — push results in login attempt failed with 404

I am trying to push a docker image to Google's container registry but keep getting a error about Docker login having failed. I run gcloud docker -- push gcr.io/<my-project-id>/test-image I ...
25
votes
6answers
83k views

Creating a docker mysql container with a prepared database scheme

I want to create a docker image on top of the mysql one that already contains the necessary scheme for my app. I tried adding lines to the Dockerfile that will import my scheme as a sql file. I did ...
25
votes
3answers
17k views

Amazon ECS (Docker): binding container to specific IP address

I'm playing with Amazon ECS (a repackaging of Docker) and I'm finding there's one Docker capability that ECS does not seem to provide. Namely, I would like to have multiple containers running in an ...
24
votes
2answers
14k views

How to decide between a docker volume container and a docker volume?

After reading the docs I found myself somewhat confused as to how best to manage productive application/service data. There seem to be 3 options: Simply map volume to host directory (i.e. -v ...
24
votes
5answers
49k views

“No command specified” from re-imported docker image/container

I am trying to take a docker container from one machine and run it on another and encountering this error: "Error response from daemon: No command specified". Below is a simplified example showing ...
24
votes
2answers
17k views

Docker volume backup and restore

I'm using Docker to deploy some services on a CentOS 6.4 server, and I'm trying to figure out how to properly backup data they generate. For example, one of the services is a web application where ...

1
2 3 4 5
64