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.

1188 questions
1131
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
  • 40,306
  • 22
  • 94
  • 154
976
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 …
Timur Fayzrakhmanov
  • 24,775
  • 10
  • 26
  • 35
291
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…
Philipp Claßen
  • 4,354
  • 6
  • 25
  • 31
236
votes
10 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
  • 2,463
  • 2
  • 9
  • 4
141
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,606
  • 3
  • 19
  • 25
140
votes
9 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,768
  • 2
  • 12
  • 14
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,067
  • 4
  • 21
  • 24
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…
Duncan Gravill
  • 2,315
  • 4
  • 12
  • 9
109
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…
Duncan Gravill
  • 2,315
  • 4
  • 12
  • 9
95
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,531
  • 2
  • 13
  • 12
88
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,015
  • 1
  • 9
  • 6
67
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
  • 18,749
  • 26
  • 70
  • 97
63
votes
9 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,323
  • 1
  • 9
  • 9
60
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.
nayan tiwari
  • 711
  • 1
  • 5
  • 4
54
votes
5 answers

Permission denied when running Docker after installing it as a Snap

I've installed Docker through the Software store, which indicated that it was a Snap package. Which is fine by me, I guess, but unfortunately, every Docker command I've tried doesn't work: $ docker info Got permission denied while trying to connect…
Vincent
  • 2,218
  • 2
  • 16
  • 19
1
2 3
79 80