Questions tagged [docker]

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

Filter by
Sorted by
Tagged with
245
votes
16answers
262k 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 ...
133
votes
5answers
36k 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 ...
9
votes
2answers
4k 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 ...
62
votes
4answers
85k 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 ...
48
votes
4answers
115k 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 ...
31
votes
4answers
34k 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 ...
201
votes
10answers
336k 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 ...
55
votes
11answers
117k 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 ...
24
votes
2answers
17k 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 ...
37
votes
4answers
72k 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 ...
57
votes
7answers
49k 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? ...
35
votes
3answers
32k 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 ...
15
votes
2answers
94k 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                                       ...
10
votes
2answers
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/...
3
votes
1answer
4k 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 ...
1
vote
1answer
1k 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
1answer
840 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
2answers
2k 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 ...
106
votes
3answers
35k 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 ...
58
votes
7answers
122k 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 ...
35
votes
5answers
41k 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 ...
27
votes
4answers
54k 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 ...
46
votes
2answers
30k 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 ...
13
votes
3answers
20k 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 ...
13
votes
4answers
20k 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 ...
61
votes
5answers
179k 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/...
35
votes
1answer
16k 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 ...
31
votes
1answer
56k 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" ...
22
votes
2answers
25k 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 ...
10
votes
4answers
16k views

Kernel Tuning with Privileged Docker Container

I'm building a container to tune kernel settings for a load balancer. I'd prefer to deploy those changes to the host in an image using a single privileged container. For example: docker run --rm --...
12
votes
2answers
12k 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
1answer
21k 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 (...
10
votes
1answer
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" ...
15
votes
2answers
14k 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. ...
14
votes
3answers
11k 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,...
13
votes
1answer
5k 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 ...
10
votes
4answers
6k views

Integrate Amazon Elastic Container Registry with Jenkins

I'm trying to integrate Amazon's new Elastic Container Registry (ECR) with my Jenkins build service. I'm using the Cloudbees Docker Build & Publish plugin to build container images and publish ...
8
votes
3answers
9k views

Kubernetes - how to map docker run command-line parameters to kubectl command line

I need to run this Docker command in Kubernetes: docker run -p 8080:8080 sagemath/sagemath sage -notebook I can map everything across except "-notebook" - does anyone know how to do that? Here is ...
7
votes
1answer
5k views

Not able to access to the internet in a container on a VPN

I'm not able to do a ping in a container when the VPN is started on my host machine. I try do this : docker run adiazmor/docker-ubuntu-with-ping ping 8.8.8.8 It fails when the VPN is started but ...
5
votes
2answers
12k views

What is the difference between creating a volume or a mount in docker containers?

Docker provides 2 ways to backup and sync container data on the local machine i.e. volume and mount. Both behave in the same way except for a few things I noticed: A volume always keeps data in /var/...
19
votes
2answers
44k 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 /...
15
votes
4answers
10k 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]...
10
votes
4answers
15k views

How do you name a docker container?

On Ubuntu 12.04.4 I installed Docker 1.1.2. I have tried various attempts at setting the image id using: sudo docker run -i -t --name=container1 ubuntu date However, my attempts seem to fail. ...
10
votes
2answers
9k 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 ...
7
votes
2answers
6k views

tail -f not following log file in Docker container

I am seeing some strange behavior running the tail -f command inside a Docker container in CoreOS. There are a number of variables I can think of that may be contributing to the problem but I am not ...
5
votes
2answers
2k views

Hyper-V Containers are going to allow running of Linux Containers?

I cannot find a definitive answer anywhere (lots of contradicting information and very general). With the new version of MS Windows Server 2016 it's going to be possible to run containers in two modes:...
1
vote
1answer
18k views

111: Connection refused nginx proxy for Docker containers

CentOS 7 I have a simple Nginx proxy Docker container listening on port 80. Here is the Dockerfile: FROM centos:7 MAINTAINER Brian Ogden # Not currently being used but may come in handy ARG ...
11
votes
2answers
12k views

Docker daemon answers '404 page not found' after update

I recently updated my docker from 1.4 to 1.5 (with the package lxc_docker). Since then, docker daemon sends an error like this (for every command): $ docker version Client version: 1.5.0 Client API ...
7
votes
4answers
7k 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 ...
6
votes
2answers
7k views

Docker + Apache, how does memory usage work?

Let's say I have a docker host set up with 50 containers each running a site served by Apache. As I understand it each container will have an Apache instance running and typically each Apache ...