Questions tagged [docker]
Docker is an open source project that automates the deployment of applications inside software containers.
146
questions
24
votes
4
answers
13k
views
Docker breaks libvirt bridge network
This issue is driving me crazy. I run a fresh install of Ubuntu 18.04, with:
ufw to manage the firewall
a br0 bridge
lxd and libvirt (KVM)
I tried stock docker.io package and packages form docker's ...
140
votes
4
answers
45k
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 ...
254
votes
11
answers
549k
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 ...
80
votes
5
answers
127k
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 ...
351
votes
27
answers
458k
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 ...
196
votes
10
answers
178k
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?
...
80
votes
6
answers
140k
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 ...
70
votes
4
answers
221k
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 ...
48
votes
5
answers
69k
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 ...
41
votes
3
answers
52k
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 ...
19
votes
3
answers
28k
views
Routing from docker containers using a different physical network interface and default gateway
Background Information
I have a server with two network interfaces that is running Docker. Docker, like some virtualization tools, creates a Linux bridge interface called docker0. This interface is ...
72
votes
13
answers
212k
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 ...
51
votes
4
answers
121k
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
1
answer
18k
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 ...
32
votes
3
answers
88k
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 /...
32
votes
2
answers
166k
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 ...
24
votes
2
answers
18k
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 ...
14
votes
2
answers
24k
views
Can't ping (permission denied)
I have an issue with my docker installation. For some security reasons I configured my "daemon.json" that the namespace is switched to another user (userns-remap). Now I have the problem that if I run ...
11
votes
5
answers
12k
views
Is there any way to run Postfix in foreground?
Is there any way to run Postfix in foreground?
I want to run Postfix as PID 1 in docker. I don't want to use any bash shell, supervisorD, or any wrapper to start it.
I just want to know if there is ...
10
votes
2
answers
11k
views
connecting from docker container to docker host
I have a setup where I run all parts of my website in docker containers. My nginx that listens on port 80 and 443 run in a container.
363292a98545 scivm/nginx-django-scivmcom:latest /usr/...
7
votes
2
answers
14k
views
nginx refresh upstream server IP
I have a Docker setup with one Django container and one nginx serving static files. I have nginx configured in the standard way:
upstream main_web {
server web:8000;
}
server {
location / {
...
7
votes
2
answers
18k
views
NGINX is giving 404 errors on all but the HTML pages
I setup nginx as a reverse proxy in a docker container to link to sites outside of the container. I have a vhost config setup as follows (I tried adding the ^~ before the location for home-assistant):...
6
votes
1
answer
11k
views
Kubernetes, Docker and vm.max_map_count
While attempting to run ElasticSearch on K8 I ran into an error that would kill the container:
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
Fortunately ...
5
votes
1
answer
7k
views
Docker Private Registry - Deleted all images, but still showing in catalog
Following the official documentation (https://docs.docker.com/registry/spec/api/#deleting-an-image) I have been able to successfully delete an image. As expected, after deleting, the image can no ...
2
votes
3
answers
27k
views
Can't access mysql docker container from the host
I have a debian server with docker 1.6.0 on it with a running official mysql container (https://registry.hub.docker.com/_/mysql/).
I use a fairly basic firewall configuration in which all ports are ...
2
votes
2
answers
5k
views
How to allow communications with client to client on OpenVPN Server?
Client 1: 192.168.255.3 cannot ping Client 2: 192.168.255.4
How to do it so that Client 1 can communicate with the Client 2?
```
# cat /var/lib/docker/volumes/ovpn-data-example/_data/openvpn.conf
...
2
votes
1
answer
1k
views
why port forwarding is not working in this setup?
I'm trying to setup a docker virtualization environment. This is a follow up of this question.
I have a virtual eth0:0 interface, and I would like to forward it using iptables.
The public, main IP ...
1
vote
1
answer
2k
views
How to setup a reverse proxy using nginx?
I am trying to get hostnames for my docker containers, and since I can only use a reverse proxy for that, I am trying to achieve exactly that with the help of nginx.
One docker container is a ...
1
vote
2
answers
4k
views
Docker service not able to start anymore because of modprobe error
I just ran in some issues with my server running docker that I cannot fix myself. Im using Docker version 18.09.0, build 4d60db4 with Ubuntu 16.04.5 LTS. During the day I noticed, that my docker ...
129
votes
4
answers
46k
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 ...
97
votes
7
answers
318k
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/...
73
votes
7
answers
181k
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 ...
71
votes
1
answer
189k
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"
...
67
votes
3
answers
63k
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 ...
54
votes
3
answers
49k
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 ...
31
votes
4
answers
66k
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 ...
26
votes
5
answers
80k
views
How do I expose the docker API over TCP?
I am using portainer and am unable to manage remote endpoints. I tried using the command line to connect to remote docker nodes, but got a message Cannot connect to the Docker daemon at tcp://<...
24
votes
2
answers
65k
views
How to add a file to a docker container which has no root permissions?
I'm trying to add a file to a Docker image built from the official tomcat image. That image does not seem to have root rights, as I'm logged in as user tomcat if I run bash:
docker run -it tomcat /...
23
votes
2
answers
39k
views
Iptables rule-set so that a docker container can access a service on a host IP
I have troubles accessing a host private interface (ip) from a docker container. I'm fairly certain that it's related to my Iptables rules (or perhaps routing). When I add the --net=host flag to ...
17
votes
3
answers
15k
views
Restricting the network access of Docker container
I'm in the process of creating an SFTP only Docker container, one that will be used by multiple people for the sole purpose of uploading and managing files in their own chrooted Environment.
On paper,...
17
votes
2
answers
21k
views
Docker - Exposed ports accessible from outside - iptables rules ignored
I have a docker container running like:
docker run --name some_container_1 -p 8080:80 -d some_image
Which works fine. The container exposes it's port 80 to 8080 and is accessible from localhost.
...
17
votes
5
answers
16k
views
Nginx rewrite on docker machine when host port != container port
I'm trying to run multiple docker containers all running nginx listening on port 80, but with different host ports mapping to the containers port 80.
For the most part this works, except for when ...
16
votes
1
answer
9k
views
No IPv6 connectivity from docker container
i'm having serious problems enabling IPv6 in docker.
Environment
The host is running Debian Jessie.
It's a virtual Server (KVM).
eth0 has a statically configured address like w:x:y:z::1 in a ...
15
votes
5
answers
17k
views
How to exit all supervisor processes if one exited with 0 result
I run docker container with supervisor like this:
Dockerfile
CMD ["/run.sh"]
run.sh
#!/usr/bin/env bash
exec supervisord -n
supervisor-serf.conf
[group:job]
programs=serf,producer
[program:serf]...
15
votes
1
answer
34k
views
Allow Docker containers to connect to OpenVPN clients on the host tunnel interface
I have the following setup :
A CentOS host running the docker service
A user defined docker bridge network
2 Docker containers connected to that user defined bridge network
An OpenVPN installation (...
13
votes
1
answer
4k
views
OS docker container: what is the difference with a VM then?
What is the point of using an OS in a docker container?
In the docker repository, you find an Ubuntu docker image: https://registry.hub.docker.com/_/ubuntu/
I thought Docker was more at the "app" ...
13
votes
4
answers
22k
views
Is it possible to use Docker to separate web sites for users?
I manage servers where users have their own websites on it that can be accessed by FTP (like an hosting company) and instead of working on isolating LAMP stack processes, I was wondering if it was ...
12
votes
2
answers
13k
views
Newer docker client with older Docker host
We have a slightly older Docker server running on RHEL 6.6. It's not well-supported by our operations team right now, so we can't upgrade easily. Right now it runs Docker 1.3.2 from an EPEL repo. If I ...
12
votes
3
answers
69k
views
Cannot connect to MongoDB in docker
Using the official mongo image from the docker hub, I run the following command to get it running:
docker run --name api -p 127.0.0.1:27017:27017 -p 127.0.0.1:28017:28017 -d mongo
Then from another ...
11
votes
2
answers
12k
views
docker-compose for nginx and nodejs server
I have the following docker-compose.yml file:
version: '3'
services:
server:
build:
context: ../../
dockerfile: ./packages/website/Dockerfile
command: node ...