Questions tagged [docker]

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

Filter by
Sorted by
Tagged with
374 votes
30 answers
510k 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 ...
Hugo Rodger-Brown's user avatar
280 votes
4 answers
277k 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 ...
Mihai's user avatar
  • 3,186
258 votes
12 answers
582k 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 ...
Chockomonkey's user avatar
  • 2,723
227 votes
3 answers
366k 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 ...
warp's user avatar
  • 2,489
220 votes
10 answers
207k 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? ...
user1424739's user avatar
  • 2,359
157 votes
6 answers
302k 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) ...
estani's user avatar
  • 2,171
140 votes
4 answers
46k 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 ...
Make Mark's user avatar
  • 1,994
133 votes
4 answers
48k 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 ...
user1620696's user avatar
  • 1,443
127 votes
10 answers
90k 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 ...
Hawkeye's user avatar
  • 2,739
124 votes
4 answers
176k 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. ...
Stefan Arentz's user avatar
122 votes
8 answers
147k 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: ...
Bostone's user avatar
  • 1,353
108 votes
3 answers
120k 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?
simone's user avatar
  • 1,281
100 votes
8 answers
341k 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/...
Vladan's user avatar
  • 1,163
90 votes
5 answers
162k 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 ...
jrtapsell's user avatar
  • 1,236
84 votes
1 answer
246k 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" ...
Marcin Zablocki's user avatar
82 votes
6 answers
156k 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 ...
kolypto's user avatar
  • 11.2k
82 votes
2 answers
139k 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 ...
shearn89's user avatar
  • 3,506
79 votes
14 answers
229k 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 ...
Thomas V.'s user avatar
  • 2,141
79 votes
7 answers
201k 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 ...
Miguel Ping's user avatar
75 votes
4 answers
157k 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?
Pellaeon's user avatar
  • 963
74 votes
5 answers
159k 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-...
Bob Yoplait's user avatar
74 votes
4 answers
241k 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 ...
Snowcrash's user avatar
  • 1,157
73 votes
5 answers
206k 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 ...
Korjavin Ivan's user avatar
71 votes
2 answers
79k 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 ...
Phil L.'s user avatar
  • 1,165
71 votes
3 answers
71k 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 ...
Juan Sebastian's user avatar
69 votes
5 answers
155k 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/...
schmmd's user avatar
  • 793
66 votes
3 answers
57k 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 ...
piero-la-lune's user avatar
59 votes
5 answers
54k 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 ...
p4guru's user avatar
  • 963
57 votes
4 answers
20k 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 ...
Golo Roden's user avatar
57 votes
1 answer
28k 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 ...
Duncan Jones's user avatar
55 votes
12 answers
195k 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 ...
dlyk1988's user avatar
  • 1,684
55 votes
6 answers
134k 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 ...
Greendrake's user avatar
  • 1,421
51 votes
4 answers
128k 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 ...
mxscho's user avatar
  • 692
51 votes
5 answers
80k 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 ...
GGGforce's user avatar
  • 759
51 votes
2 answers
79k 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. ...
Ivan Kolmychek's user avatar
50 votes
12 answers
214k views

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 https://registry-1.docker.io/v2/: net/http: TLS handshake timeout However ...
Willem's user avatar
  • 2,922
47 votes
12 answers
82k 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 ...
Ivan Kolmychek's user avatar
45 votes
4 answers
91k 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 ...
kaiser's user avatar
  • 1,241
45 votes
3 answers
74k 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 ...
Vingtoft's user avatar
  • 1,597
41 votes
3 answers
58k 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 ...
aronchick's user avatar
  • 695
41 votes
11 answers
78k views

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
29k 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 ...
Petrus Repo's user avatar
38 votes
3 answers
90k views

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
186k views

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
37 votes
6 answers
38k 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 ...
dflemstr's user avatar
  • 583
36 votes
1 answer
19k 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 ...
Tarnay Kálmán's user avatar
35 votes
5 answers
47k views

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
98k 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. ...
mgmonteleone's user avatar
34 votes
7 answers
126k 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 ...
Tom Klino's user avatar
  • 641
34 votes
3 answers
98k views

How to get php-fpm to log to stdout / stderr when running in a docker container

I have php-fpm in a docker container and in the Dockerfile I edit the fpm config file (/etc/php5/fpm/pool.d/www.conf) to set up access logs to go to /var/log/fpm-access.log and error logs to go to /...
Tom's user avatar
  • 4,367

1
2 3 4 5
86