Questions tagged [docker]

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

Docker is an open source project that automates the deployment of applications inside software containers. Docker extends a common container format called Linux Containers (LXC), with a high-level API providing a lightweight virtualization solution that runs processes in isolation. Docker utilizes LXC, cgroups, and the Linux kernel itself. Unlike traditional virtual machines, a Docker container does not include a separate operating system, instead it relies on the operating system’s functionality provided by the underlying infrastructure.

3896 questions
336
votes
23 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 startup, but is not know before then (it's dynamic).…
Hugo Rodger-Brown
  • 3,507
  • 2
  • 17
  • 12
247
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 0e5574283393 my-imaj docker tag 0e5574283393…
Mihai
  • 2,796
  • 3
  • 13
  • 12
243
votes
11 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 this by doing the following in my Dockerfile: RUN…
Chockomonkey
  • 2,573
  • 2
  • 10
  • 10
207
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 run --interactive --tty --entrypoint=/bin/bash…
warp
  • 2,289
  • 2
  • 14
  • 6
173
votes
9 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? Step 25/25 : RUN apt-get install -y tzdata --->…
user1424739
  • 1,879
  • 2
  • 12
  • 9
146
votes
5 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) RUN mkdir -p -- /lib-override /etc-override && cp…
estani
  • 2,011
  • 2
  • 17
  • 12
139
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 packages) to provide. One point of this is that the…
Markus Miller
  • 1,914
  • 3
  • 15
  • 15
128
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 container is just a sandbox inside of which an entire…
user1620696
  • 1,393
  • 2
  • 10
  • 9
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 Ubuntu linux user mode running natively on…
Hawkeye
  • 2,669
  • 9
  • 30
  • 34
121
votes
3 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. But that doesn't feel like the right thing for…
Stefan Arentz
  • 1,320
  • 2
  • 9
  • 8
108
votes
7 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: containers: - name: dbload image:…
Bostone
  • 1,213
  • 2
  • 9
  • 8
108
votes
3 answers

Can Mac OS X be run inside Docker?

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
  • 1,281
  • 2
  • 10
  • 10
90
votes
7 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/sbin/php5-fpm"] But it's not working. Container…
Vladan
  • 1,003
  • 1
  • 7
  • 5
77
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 collect it. However, the application can only write to…
kolypto
  • 10,738
  • 12
  • 51
  • 66
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
  • 953
  • 1
  • 7
  • 7
1
2 3
99 100