Questions tagged [docker]

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

Filter by
Sorted by
Tagged with
24 votes
4 answers

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 package and packages form docker's ...
Laurent's user avatar
  • 386
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 ...
Markus Miller's user avatar
254 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 ...
Chockomonkey's user avatar
  • 2,683
80 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,136
351 votes
27 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
196 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,119
80 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
  • 11k
70 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,107
48 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
  • 719
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
19 votes
3 answers

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 ...
user avatar
72 votes
13 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,031
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
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
32 votes
3 answers

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,247
32 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
24 votes
2 answers

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 ...
fcoelho's user avatar
  • 343
14 votes
2 answers

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 ...
Phil's user avatar
  • 153
11 votes
5 answers

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 ...
Farhan's user avatar
  • 4,279
10 votes
2 answers

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/...
user3133475's user avatar
7 votes
2 answers

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 / { ...
user1496984's user avatar
7 votes
2 answers

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):...
Randy's user avatar
  • 189
6 votes
1 answer

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 ...
Spencer Ruport's user avatar
5 votes
1 answer

Docker Private Registry - Deleted all images, but still showing in catalog

Following the official documentation ( I have been able to successfully delete an image. As expected, after deleting, the image can no ...
emmdee's user avatar
  • 2,127
2 votes
3 answers

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 ( I use a fairly basic firewall configuration in which all ports are ...
tagsOf's user avatar
  • 31
2 votes
2 answers

How to allow communications with client to client on OpenVPN Server?

Client 1: cannot ping Client 2: 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 ...
Sebastian Korotkiewicz's user avatar
2 votes
1 answer

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 ...
Mascarpone's user avatar
1 vote
1 answer

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 ...
k0pernikus's user avatar
  • 4,120
1 vote
2 answers

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 ...
Dominik Spiertz's user avatar
129 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,403
97 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/...
Vladan's user avatar
  • 1,093
73 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
71 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
67 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
54 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
31 votes
4 answers

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 ...
mikemaccana's user avatar
  • 3,340
26 votes
5 answers

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://<...
Lord Loh.'s user avatar
  • 1,089
24 votes
2 answers

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 /...
nyi's user avatar
  • 350
23 votes
2 answers

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 ...
Dynom's user avatar
  • 241
17 votes
3 answers

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,...
Daniel S's user avatar
  • 415
17 votes
2 answers

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. ...
binaryanomaly's user avatar
17 votes
5 answers

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 ...
Ibasa's user avatar
  • 281
16 votes
1 answer

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 ...
lajuette's user avatar
  • 771
15 votes
5 answers

How to exit all supervisor processes if one exited with 0 result

I run docker container with supervisor like this: Dockerfile CMD ["/"] #!/usr/bin/env bash exec supervisord -n supervisor-serf.conf [group:job] programs=serf,producer [program:serf]...
Vitaly Velikodny's user avatar
15 votes
1 answer

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 (...
ddewaele's user avatar
  • 333
13 votes
1 answer

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: I thought Docker was more at the "app" ...
Michael's user avatar
  • 471
13 votes
4 answers

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 ...
Cyril N.'s user avatar
  • 614
12 votes
2 answers

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 ...
kojiro's user avatar
  • 559
12 votes
3 answers

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 -p -d mongo Then from another ...
wheeler's user avatar
  • 299
11 votes
2 answers

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 ...
dagda1's user avatar
  • 247