Questions tagged [docker]

Docker is an application to create containers for applications.

Filter by
Sorted by
Tagged with
198
votes
2answers
185k views

What is the difference between Docker, LXD, and LXC [closed]

What is the difference between Docker, LXD, and LXC. Do they offer the same services or different.
112
votes
4answers
88k views

Forward SIGTERM to child in Bash

I have a Bash script, which looks similar to this: #!/bin/bash echo "Doing some initial work...."; /bin/start/main/server --nodaemon Now if the bash shell running the script receives a SIGTERM ...
112
votes
5answers
173k views

Unable to locate package `docker-ce` on a 64bit ubuntu

I'm trying to install Docker on a Ubuntu 64 machine following the official installation guide. Sadly Ubuntu seems it is not able to locate the docker-ce package. Any idea to fix it or at least to ...
55
votes
4answers
42k views

Extract file from docker image?

I'ld like to extract a file from a Docker image without having to run the image. The docker save option is not currrently a viable option for me as it's saving too huge of a file just to un-tar a ...
49
votes
3answers
74k views

Creating threads fails with “Resource temporarily unavailable” with 4.3 kernel

I am running a docker server on Arch Linux (kernel 4.3.3-2) with several containers. Since my last reboot, both the docker server and random programs within the containers crash with a message about ...
47
votes
7answers
90k views

How to configure Centos 7 firewallD to allow docker containers free access to the host's network ports?

I have docker installed on CentOS 7 and I am running firewallD. From inside my container, going to the host (default 172.17.42.1) With firewall on container# nc -v 172.17.42.1 4243 nc: connect to ...
41
votes
2answers
33k views

Docker — WARNING: No swap limit support

I'm running Docker(1.9.1) on Ubuntu 16.04. When I run docker info the last line of the output says WARNING: No swap limit support. INFO[0781] GET /v1.21/info Containers: ...
41
votes
6answers
23k views

How to determine Docker image size before being pulled?

We can search for available image files on the docker website like this: https://index.docker.io/search?q=ubuntu How can I tell what the download size(s) will be prior to pulling? docker.io pull [...
35
votes
9answers
100k views

Why am I getting “Cannot connect to the Docker daemon” when the daemon is running?

The Docker service is clearly running: $ systemctl status docker.service ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; ...
35
votes
2answers
18k views

What do the processes inside a Docker container look like?

I've heard confusion come up several times recently around what a Docker container is, and more specifically what's going on inside, with respect to commands & processes that I invoke while inside ...
27
votes
5answers
21k views

What's the difference between `curl | sh` and `sh -c “$(curl)”`?

One easy install method for Docker (for example) is this: curl -sSL https://get.docker.com/ | sh However, I have also seen some that look like this (using the Docker example): sh -c "$(curl -sSL ...
27
votes
1answer
11k views

User permissions inside and outside of LXC containers?

I'm running some services inside of Docker LXC containers on my server and I'm beginning to actually do serious things with them. One thing I'm not clear on is how user permissions work inside and ...
23
votes
3answers
3k views

Is having docker installed a massive security hole?

Suppose I have an Ubuntu machine and did sudo apt install docker.io. Did I just put a huge security hole in my machine that will allow anyone with terminal access to escalate into root? I ask that ...
23
votes
3answers
50k views

Docker says “no space left on device” but, system has plenty of space?

I'm trying to run a docker image that works on other systems (and you can even pull it from dockerhub, if you'd like: it's dougbtv/asterisk) however, on my general workstation, it's complaining about ...
22
votes
1answer
31k views

Pull a file from a Docker container?

I can see that it's possible to insert a file into a Docker container via insert: docker insert IMAGE URL PATH Is there a way to fetch the contents of a file in a Docker container and save them ...
21
votes
3answers
26k views

Docker overrides my /etc/resolv.conf file inside containers

I want to set my resin/rpi-raspbian:jessie container's /etc/resolv.conf to: nameserver 208.67.222.222 nameserver 208.67.220.220 My Dockerfile has the following line: ADD resolv.conf /etc/resolv....
20
votes
2answers
28k views

How can I run a graphical application in a container under Wayland?

When I used an X11 desktop, I could run graphical applications in docker containers by sharing the $DISPLAY variable and /tmp/X11-unix directory. For example: docker run -ti -e DISPLAY=$DISPLAY -v /...
19
votes
2answers
24k views

How to run builds in Docker containers from Jenkins

I am trying to use Jenkins to build a C++ project in a Docker container. I have no problem building in Jenkins, or building in a container outside of Jenkins. Below is what I tried. I am omitting the ...
18
votes
5answers
18k views

“date -d” command fails on Docker Alpine Linux container

I built Alpine Linux in a Docker container with the following Dockerfile: FROM alpine:3.2 RUN apk add --update jq curl && rm -rf /var/cache/apk/* the build run successfully: $ docker build -...
18
votes
3answers
49k views

Docker: create a persistent volume in a specific directory

I need to create a persistent volume for Docker. The volume must be named extra-addons and located in /mnt/. I run this command: sudo docker volume create /mnt/extra-addons I got this error ...
17
votes
2answers
48k views

locale-gen command in centos6

In my bare centos6.5 system, which is a docker container, en_US.utf-8 locale is missing: bash-4.1# locale -a C POSIX Normally in Ubuntu there is command locale-gen to do this: # locale-gen en_US....
17
votes
4answers
14k views

How can I substitute lsof inside a Docker (native, not LXC-based)

I'm somewhat baffled that inside a Docker container lsof -i doesn't yield any output. Example (all commands/output from inside the container): [1] root@ec016481cf5f:/# lsof -i [1] root@ec016481cf5f:/...
16
votes
4answers
47k views

Is it possible to modify a yml file via shell script?

This is how my docker-compose.yml looks like. nginx: container_name: 'nginx' image: 'nginx:1.11' restart: 'always' ports: - '80:80' - '443:443' volumes: - '/opt/nginx/conf.d:/...
16
votes
1answer
26k views

List IP tables in Docker Container

I want to run the iptables command in a Ubuntu 16.04 Docker container. I have created a user, given that user root permissions, added them to the sudo group, but I am still being told that I am not ...
16
votes
4answers
30k views

X11 forwarding from a docker container in remote server

I want to ssh into my linux mint 18 server (running X11) and log into a docker container and have iPython matplotlib plots forwarded to the local client (also mint). All in the local network. The ...
16
votes
1answer
12k views

What is cgroupfs and how is it used with Docker?

In the Docker documentation there is a discussion of options for the native execdriver (https://docs.docker.com/engine/reference/commandline/daemon/). The documentation says The native....
15
votes
5answers
5k views

Can't install man pages on minimal Centos Docker container

I have a minimal Centos 7 Docker image, and I'm trying to get some man pages on it to help in debugging my Dockerfile. Out of the box, it doesn't have much: # man ls No manual entry for ls Per this ...
15
votes
2answers
8k views

When and why should I use apt-get update?

General question: Could some explain what the command apt-get update does and when I really should use it? Remarks Please give a detailed answer. Not just a copy of the man page, unless your ...
14
votes
1answer
24k views

Getting cron to work on docker

I am using nginx in docker. I have configured cron jobs to update SSL certificates and DNS registration. However the cron jobs are not running. What have I done. I have created a Dockerfile based on ...
14
votes
3answers
4k views

How to limit Docker total resources?

I'm trying to limit the total resources accessible from docker (for example only 90% of the RAM and 1500% of the CPU). I cannot use CPU and RAM limit when I'm launching my containers, that's why I ...
14
votes
4answers
24k views

Docker + Bridges + DHCP

I have a lot of docker containers that I need addressable on the the same LAN as their hosts. Up until now, I have been achieving this by using setting up a bridge and manually assigning them IPs, and ...
13
votes
2answers
6k views

Why does Docker need root privileges?

I am learning Docker, and I quite like it. However, I don't understand, why does docker need root privileges for making containers, reading logs, and so on. I have read some articles like this one ...
13
votes
1answer
866 views

Why is conmon in a different cgroup when podman is started with systemd?

Given podman is installed on a linux system and a systemd unit named baz.service: # /etc/systemd/system/baz.service [Service] ExecStart=/usr/bin/podman run --rm --tty --name baz alpine sh -c 'while ...
13
votes
1answer
16k views

Docker postgres “psql: FATAL: role ”root“ does not exist”

I started a postgres docker container using sudo docker run --name some-postgres -d postgres and then attempted to connect to it using sudo docker run -it --rm --link some-postgres:postgres ...
13
votes
1answer
5k views

systemd how to run service after docker.service

I have a service file, which executes a shell script, and the script needs to be executed after docker is started. Here is what I tried, but the script is started without waiting for the docker....
12
votes
2answers
14k views

Can't run docker hello-world: mountpoint for devices not found

New to docker. Installed docker from software management tool in mint 17. When I run docker run hello-world I receive: FATA[0000] Error response from daemon: Cannot start container ...
12
votes
2answers
7k views

How to allow systemd-resolved to listen to an interface other than loopback?

systemd-resolved is a daemon that, among other things, acts as a DNS server by listening IP address 127.0.0.53 on the local loopback interface. I would like to let the daemon listen to another ...
12
votes
1answer
9k views

Can I build a Docker container from Dockerfile in an interactive way with allocation of some pseudo TTY?

I build container from below Dockerfile: FROM ubuntu:14.04 ... RUN apt-get update && apt-get install -y vim #RUN ssh-keygen -f /root/.ssh/id_rsa -N strongpass123$%^ RUN ssh-keygen -f /root/....
11
votes
1answer
20k views

Unable to kill process with PID 1 in docker container

I have the following Dockerfile for creating a container with a powerdns recursor in it: FROM debian:stretch-slim ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && \ apt-get ...
11
votes
1answer
15k views

What do the contents of /etc/subuid mean in the context of docker [closed]

My /etc/subuid file contains: ... dockremap:165536:65536 I don't understand what the dockremap line means, please explain. I've run a docker with dockerd --userns-remap=default to make use of user ...
11
votes
2answers
6k views

AppArmor profiles in Docker/LXC

I have a Docker container (LXC) which runs MySQL. Since the idea behind Docker is generally "one running process per container," if I define AppArmor profiles targeting the MySQL binary, will they be ...
11
votes
1answer
5k views

How do you enable the secret-tool command (backed by gnome-keyring, libsecret and dbus) in a headless CentOS Docker container?

I'm trying to use the secret-tool command to store a secret securely in a running headless CentoS 7.5.1804 Docker container, but can't seem to find which packages and/or configuration is necessary to ...
11
votes
3answers
14k views

How to use/test pivot_root?

I want to test the pivot_root command which moves the root file system of the current process to the directory put_old and makes new_root the new root file system. But I always get the following error:...
11
votes
1answer
2k views

bash not resizing correctly within interactive Docker container

Every time the terminal size changes, usually bash will resize automatically so that the LINES and COLUMNS are recomputed correctly. But for some reason this isn't working within a Docker container ...
11
votes
1answer
14k views

docker - how to run x desktop in a container?

I'm trying to set up my Linux machine to run multiple guest OSes, one of those being a Windows VM, and another a Linux container. The goal here is to prevent me from messing up the host system, while ...
10
votes
3answers
31k views

Mounting a NFS Directory into Host Volume that is shared with Docker

Consider the following Docker container: docker run --rm -it -v /tmp:/mnt/tmp alpine sh This mounts the host directory /tmp into /mnt/tmp inside of the alpine container. Now, on the Host System I ...
10
votes
3answers
12k views

find and sed string in docker got error ` Device or resource busy`

This problem only happen in docker container. Only find is fine: find ${BASIN_SPIDER_CONFIG_PATH} -type f -name "*.json" find with sed find ${BASIN_SPIDER_CONFIG_PATH} -type f -name "*.json"|...
10
votes
1answer
4k views

Docker Debian Jessie: Can't find /var/log/syslog

I'm building on top of a Postgres Docker container which has cron implemented on top of Debian Jessie: For debugging I want to look at the logs which I'm expecting to be at /var/log/syslog, but I don'...
10
votes
2answers
7k views

Installing docker hangs at “setting up docker-engine” on ubuntu xenial

I'm trying to install docker on ubuntu xenial and am following this tutorial: https://docs.docker.com/engine/installation/linux/ubuntulinux/. So far it's gone without a hitch except for there ...
10
votes
4answers
8k views

Apt-get error : Writing more data than expected (7643558 > 7643216)

I am getting some weird errors with an ubuntu docker container: "Writing more data than expected (7643558 > 7643216)" Retrying the operations succeeded. I got this several times. I am running the ...

1
2 3 4 5
25