Questions tagged [docker]

Docker is a container engine for developing, managing, and running OCI containers for applications. Use this tag for questions on how to build and run container images, as well as how to properly configure Docker containers.

Docker provides a suite of tools to build, ship, and run distributed applications in containers, using the default Linux container runtime (containerd).

The base for a Docker container is an image with a complete filesystem for the target application, including the required environment, settings etc.

Docker images can be customized or build from scratch using a dockerfile. When the image is run with Docker, it is contained in its own runtime environment in a container. During the lifecycle of the container, any changes to the images are written as an overlay filesystem (overlayfs).

Since images are static, and containers use the kernel of the host system, Docker containers are extremely efficient, and it only takes a few seconds to start a new instance of Ubuntu or any other distribution with Docker.

There is a huge number of ready-to-use containers available in the Docker HUB.

Official Docker documentation.

1301 questions
1190
votes
5 answers

How can I use Docker without sudo?

On Docker's documentation pages, all example commands are shown without sudo, like this one: docker ps On Ubuntu, the binary is called docker.io. It also does not work without sudo: sudo docker.io ps How can I configure Docker so that I don't need…
Flimm
  • 44,031
978
votes
15 answers

How to get bash or ssh into a running container in background mode?

I want to ssh or bash into a running docker container. Please, see example: $ sudo docker run -d webserver webserver is clean image from ubuntu:14.04 $ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS …
319
votes
5 answers

Avoiding user interaction with tzdata when installing certbot in a docker container

I want to install certbot in a docker environment with an Ubuntu 16.04 image: For example: docker run -it ubuntu:16.04 /bin/bash When I'm inside the container, the most straightforward way to install certbot does not work as it requires user…
295
votes
9 answers

How to completely uninstall docker

I followed the uninstall instructions here. Then I ran these commands: sudo apt-get purge docker-engine sudo apt-get autoremove --purge docker-engine rm -rf /var/lib/docker So after I did all this I ran this command to see if docker files are any…
Luke101
  • 3,053
  • 2
  • 10
  • 4
143
votes
8 answers

How do I upgrade Docker?

I type docker.io version, and get: Client version: 0.9.1 Go version (client): go1.2.1 Git commit (client): 3600720 Server version: 0.9.1 Git commit (server): 3600720 Go version (server): go1.2.1 Last stable version: 0.11.1, please update docker I…
Gerrat
  • 1,798
143
votes
8 answers

"Package 'docker-ce' has no installation candidate" in 18.04

I'm following the official Docker installation guide for docker-ce on Ubuntu. When I get to sudo apt install docker-ce I get E: Package 'docker-ce' has no installation candidate: $ sudo apt-get update Hit:1 http://gb.archive.ubuntu.com/ubuntu bionic…
Robin Winslow
  • 2,646
  • 3
  • 21
  • 26
128
votes
1 answer

what's the main difference between Docker and Snap?

In recent c't (sadly paywalled) there is an article about Snap and Flatpak. This sounds very similar to Docker, lots of concepts are the same. Now my question what's the difference between Snap and Docker? Are those different use cases?
Sybil
  • 2,139
112
votes
8 answers

systemctl failed to connect to bus - docker ubuntu:16.04 container

I'm trying to use the systemctl command in a ubuntu:16.04 docker container. I'm running the following command... systemctl status ssh However I'm getting the error... Failed to connect to bus: No such file or directory Why is this not working? Is…
112
votes
11 answers

Uncomplicated Firewall (UFW) is not blocking anything when using Docker

This is my first time setting up an Ubuntu Server (14.04 LTS) and I am having trouble configuring the firewall (UFW). I only need ssh and http, so I am doing this: sudo ufw disable sudo ufw reset sudo ufw default deny incoming sudo ufw default…
ESala
  • 2,911
110
votes
3 answers

netstat or alternative in docker ubuntu server 16.04 container

Was netstat removed in 16.04? Is there an alternative to netstat available in 16.04? Or how do I install netstat in 16.04? I am running an ubuntu:16.04 container in docker for Windows, it seems that netstat is no longer available... It is available…
90
votes
1 answer

docker warning config.json permission denied

I just installed docker and created a group and added my username to it to avoid using sudo every time. However when I do the test and run docker run hello-world it gives me following error: WARNING: Error loading config…
Trm
  • 1,035
80
votes
10 answers

Docker-compose giving 'ContainerConfig' errors after update today

Running Ubuntu server 22.04.4 LTS. Today I did an apt update and apt upgrade which ran through a few updates, and then I pulled new docker images via docker-compose pull. After I tried to restart the containers via docker-compose, I got a bunch of…
Matt
  • 903
68
votes
7 answers

How do I install Docker on Ubuntu 16.04 LTS?

I would like to build and run Docker containers on Ubuntu 16.04 LTS. How do I install Docker?
Martin Thoma
  • 20,535
63
votes
4 answers

How do I autostart docker container at system reboot?

As I hosted a WordPress site in docker containers and i want these containers to be started at boot time always, so need to done it manually.
62
votes
11 answers

How to install latest node inside a docker container

How do I install the latest node inside a docker ubuntu 15.10 container? apt-get install nodejs installs version 0.1 and no npm Thanks
Tomasz
  • 1,343
1
2 3
86 87