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.

4147 questions
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 nginx does a redirect due to missing a trailing…
Ibasa
  • 281
  • 1
  • 2
  • 6
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. For some reason however it's ignoring the…
binaryanomaly
  • 406
  • 1
  • 4
  • 14
17
votes
1 answer

Update Docker container without downtime

Let's say I have a Docker container with a web server (like Apache 2). Now I want to update the OS under it. This SF answer says the best way is to rebuild the base image and my Apache image. But deploying the image means downtime because I have to…
das_j
  • 223
  • 2
  • 7
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, it's pretty secure: I'll disable every form of…
Daniel S
  • 415
  • 2
  • 5
  • 9
17
votes
7 answers

Docker & Shorewall

I'm using Shorewall on my server as simple standalone firewall and would like to use Docker as well. By using a Docker container and its port redirection docker sets up its own iptables rules/chains which will be killed if shorewall is restarted. So…
jaltek
  • 283
  • 3
  • 9
16
votes
2 answers

How to check the HISTORY of Docker Container Restarts

I'm trying to find the history of container restarts. Of course the STATUS field on a docker ps will show the current uptime. However if I have a container with a restart policy such as restart: unless-stopped and it's gone through several…
emmdee
  • 2,187
  • 12
  • 36
  • 60
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 network like w:x.y:z::/64, which is assigned to my by…
lajuette
  • 771
  • 6
  • 16
16
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 ["/run.sh"] run.sh #!/usr/bin/env bash exec supervisord…
Vitaly Velikodny
  • 361
  • 1
  • 2
  • 10
16
votes
1 answer

How to enable SELinux inside of a CentOS Docker container?

I am trying to install SELinux inside of a Docker container in order to distribute an application that uses SELinux internally. The default CentOS image does not have SELinux installed: $ docker run -it centos:latest /bin/bash [root@38ae5a98273d /]#…
sffc
  • 382
  • 1
  • 3
  • 11
16
votes
2 answers

Running containers inside a virtual machine?

It is my understanding that containers are much more lightweight than VMs because they do not virtualize the hardware but instead just isolate the software running in them from software running in other containers on the system. My situation is such…
Chris L
  • 323
  • 1
  • 4
  • 9
16
votes
7 answers

Running systemd inside a docker container (arch linux)

I am trying to see if I can run systemd inside a docker container (which is running arch linux in the container). I start docker with all capabilities, and bind mount in cgroups: docker run -it --rm --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro…
Michael Neale
  • 3,704
  • 5
  • 28
  • 26
16
votes
2 answers

security.debian.org 'does not have a Release file' on with Debian Docker images

It appears as both debian:stable-slim and debian:stable are both currently broken (for updates): > $ docker run -ti --rm debian:stable-slim Unable to find image 'debian:stable-slim' locally stable-slim: Pulling from library/debian fc491617b0f1:…
vpetersson
  • 861
  • 1
  • 11
  • 22
15
votes
2 answers

docker swarm database connection reset by peer

I am running a spring boot application with docker swarm and I use postgres for database. When I run both of them as docker service, database connection fails consistently and randomly (as you can see on the timestamp) as the log…
Elifcan Mehekli
  • 183
  • 1
  • 6
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 (currently running on the host. Can also run in a…
ddewaele
  • 333
  • 1
  • 4
  • 12
15
votes
1 answer

Count number of allowed CPUs in a Docker container

My specific scenario is the following. I launch a docker container with a specific cpuset: docker run --cpuset-cpus="0-2" # ... inside that container I run a shell script as the entry point and that shell script will run make at some point. I would…
pmr
  • 425
  • 1
  • 4
  • 9