Questions tagged [docker]

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

Filter by
Sorted by
Tagged with
361 votes
29 answers

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 ...
Hugo Rodger-Brown's user avatar
271 votes
4 answers

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 ...
Mihai's user avatar
  • 3,096
256 votes
12 answers

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 ...
Chockomonkey's user avatar
  • 2,703
223 votes
3 answers

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 ...
warp's user avatar
  • 2,449
215 votes
10 answers

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? ...
user1424739's user avatar
  • 2,309
157 votes
6 answers

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) ...
estani's user avatar
  • 2,171
140 votes
4 answers

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 ...
Make Mark's user avatar
  • 1,984
131 votes
4 answers

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 ...
user1620696's user avatar
  • 1,423
127 votes
10 answers

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 ...
Hawkeye's user avatar
  • 2,709
123 votes
4 answers

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. ...
Stefan Arentz's user avatar
118 votes
8 answers

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: ...
Bostone's user avatar
  • 1,313
108 votes
3 answers

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?
simone's user avatar
  • 1,281
99 votes
8 answers

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/...
Vladan's user avatar
  • 1,133
87 votes
5 answers

Configuring Docker to not use the range

Due to problems with captive portals and the default Docker IP range I am trying to make Docker use the range, instead of, which clashes with the captive portals used on the ...
jrtapsell's user avatar
  • 1,206
82 votes
2 answers

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 ...
shearn89's user avatar
  • 3,453
81 votes
6 answers

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 ...
kolypto's user avatar
  • 11.1k
81 votes
1 answer

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" ...
Marcin Zablocki's user avatar
77 votes
7 answers

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 ...
Miguel Ping's user avatar
76 votes
14 answers

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 ...
Thomas V.'s user avatar
  • 2,101
75 votes
4 answers

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?
Pellaeon's user avatar
  • 953
74 votes
5 answers

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-...
Bob Yoplait's user avatar
74 votes
4 answers

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 ...
Snowcrash's user avatar
  • 1,157
73 votes
5 answers

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 ...
Korjavin Ivan's user avatar
69 votes
5 answers

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/...
schmmd's user avatar
  • 793
68 votes
3 answers

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 ...
Juan Sebastian's user avatar
67 votes
2 answers

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 ...
Phil L.'s user avatar
  • 1,115
64 votes
3 answers

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 ...
piero-la-lune's user avatar
59 votes
5 answers

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 ...
p4guru's user avatar
  • 963
57 votes
4 answers

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 ...
Golo Roden's user avatar
57 votes
1 answer

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 ...
Duncan Jones's user avatar
55 votes
6 answers

"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 ...
Greendrake's user avatar
  • 1,421
54 votes
12 answers

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 ...
dlyk1988's user avatar
  • 1,674
51 votes
4 answers

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 ...
mxscho's user avatar
  • 682
51 votes
2 answers

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. ...
Ivan Kolmychek's user avatar
49 votes
12 answers

Docker pull: TLS handshake timeout

I get this consistenly (Ubuntu 16.04 LTS): $ docker pull nginx Using default tag: latest Error response from daemon: Get net/http: TLS handshake timeout However ...
Willem's user avatar
  • 2,872
49 votes
5 answers

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 ...
GGGforce's user avatar
  • 729
46 votes
12 answers

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 ...
Ivan Kolmychek's user avatar
46 votes
4 answers

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 ...
kaiser's user avatar
  • 1,251
45 votes
3 answers

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 ...
Vingtoft's user avatar
  • 1,577
41 votes
3 answers

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 ...
aronchick's user avatar
  • 695
41 votes
11 answers

How do you restart all Tasks of a Service?

We have a task that loads some configuration files from an external data source. After the settings are uploaded we would like to be able to restart all the tasks in a service so that the settings ...
Dennkster's user avatar
  • 511
40 votes
7 answers

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 ...
Petrus Repo's user avatar
37 votes
3 answers

What does "the input device is not a TTY" exactly mean in "docker run" output?

This is a command that works: $ echo 'hi there' | docker run -i ubuntu cat hi there This is a command that responds with an error message: $ echo 'hi there' | docker run -it ubuntu cat the input ...
Mikhail Vasin's user avatar
37 votes
2 answers

curl (56) Recv failure: Connection reset by peer - when hitting docker container [closed]

From an AWS ec2 instance (which runs docker), I am trying to curl my docker container-hosted web service. Given: [ec2-user]$ docker ps CONTAINER ID        IMAGE                                       ...
Kevin Meredith's user avatar
36 votes
6 answers

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 ...
dflemstr's user avatar
  • 573
36 votes
1 answer

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 ...
Tarnay Kálmán's user avatar
35 votes
5 answers

Send mail from Docker container with host's Postfix

I am running an Ubuntu 14.04 (Linux) server. I have installed and configured Postfix and OpenDKIM very nicely on the server; I can send emails to myself with commands such as echo hi | sendmail root, ...
David Grayson's user avatar
34 votes
9 answers

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. ...
mgmonteleone's user avatar
34 votes
7 answers

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 ...
Tom Klino's user avatar
  • 641
33 votes
4 answers

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 ...
Chris's user avatar
  • 1,261

2 3 4 5