Questions tagged [docker]

Docker images, containers, hub, and everything related to the containerization platform

Docker is an open-source software container platform written in Go.

Resources

1215 questions
28
votes
7 answers

How to create the smallest working docker image every time?

Aim: to create the smallest working docker images every time Current REPOSITORY TAG IMAGE ID CREATED SIZE a-docker-image latest x 42 minutes ago 1.92 GB Attempt Adding a cleanup…
030
  • 13,235
  • 16
  • 74
  • 173
15
votes
3 answers

Is there any concrete and acceptable solution for running systemd inside the docker container?

I have seen many workarounds for this to run systemd inside docker containers but looks like most of them compromise the security of the container and the host. How are most people here dealing with running systemd specific stuff inside the…
lakshayk
  • 636
  • 1
  • 4
  • 8
15
votes
6 answers

Is Docker right for my use case?

My company has a system we sell that consists of basically a mini-computer "Smartbox" that is running Ubuntu 12.04. This box runs a Django application plus a number of different upstart processes related to it. Not much else. We have thousands of…
12
votes
2 answers

How to explicitly kill the process with PID 1 from inside a container?

For demonstration purposes, I would like to kill the process with PID 1 from inside a container. But apparently, kill 1 doesn't work: $ sudo docker run -it centos [root@3752d3a44f10 /]# ps PID TTY TIME CMD 1 pts/0 00:00:00 bash …
Sylvain Leroux
  • 1,550
  • 1
  • 13
  • 25
11
votes
1 answer

How to know where a docker image came from?

I have a Docker image on my system 12346789ABCD. Is there a way to know where it is coming from? Specifically, I would like to know if it was built locally or downloaded from a repository, and in that latter case, downloaded from which repository.
Sylvain Leroux
  • 1,550
  • 1
  • 13
  • 25
10
votes
5 answers

Debug Docker caching issues

I am trying to improve CI/CD performance and part of that is improving the caching behaviour of Docker builds. I find myself trying to debug what exactly invalidates the cache. Are there any ways to query the Docker build process to get more…
Torque
  • 201
  • 2
  • 3
8
votes
3 answers

How to ensure that the docker build fails if an ENV has not been set?

This github discussion was found. It seems that it is allowed to build a docker image while a certain ENV does not have been set. How to ensure that the docker build fails if an ENV has not been set?
030
  • 13,235
  • 16
  • 74
  • 173
8
votes
1 answer

No longer see Docker build output properly!

I am using the latest version of Docker Desktop on Windows (Docker Engine version v19.03.13). After the last update, the output of docker build . has changed! It is now harder to debug what is going on. Here is my Dockerfile: # set base image as the…
J86
  • 227
  • 3
  • 7
6
votes
1 answer

What are the implications for Docker Community Edition of the Docker acquisition by Mirantis?

November 13, 2019, Mirantis Acquires Docker Enterprise Platform Business. The same day, Docker Inc. claims they will now focus on docker Desktop and Docker Hub. Given those changes, will Docker CE continue to share the same codebase as Docker…
Sylvain Leroux
  • 1,550
  • 1
  • 13
  • 25
6
votes
3 answers

Do Docker containers take up space?

When I list my Docker images, I can see their sizes: $ sudo docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE travisci/ci-ubuntu-1804 packer-1606831264-7957c7a9 0a7a71407638 8 days ago …
BenMorel
  • 198
  • 1
  • 8
6
votes
1 answer

Can I remove a docker image and still keep the container?

Trying to save space on the server, and I've noticed that the running containers are much smaller in size than the images I've had to pull to create the containers. I was wondering about the dependency of the running containers on the images and …
Tlink
  • 183
  • 5
5
votes
2 answers

Why does Docker hub allow non-official Docker images and why do they exist?

Note: also posted in Security StackExchange as there is a security aspect to this question (sorry for cross-posting). I'm evaluating Docker images for my development and production setups. When I research how to do something in Docker, quite often I…
therobyouknow
  • 315
  • 1
  • 3
  • 11
5
votes
1 answer

How to run Dockerized graphical applications on a headless server with packages required for display remotely on clients as part of a separate image?

In this first section I detail some of the terms I have used: Dockerized graphical applications: A Docker container run from a Docker image which runs an application which (traditionally) uses x11 (or similar) to display the application on the host…
dnk8n
  • 183
  • 1
  • 4
5
votes
3 answers

How can I convert a production Linux server into a docker Image or container?

I've a production Ubuntu that contains a huge number of software and dependencies, I want to 'clone' that VPS into a Docker image to be able to replicate the same environment and distribute them in different servers. Is that possible without any…
Marwen Trabelsi
  • 151
  • 1
  • 3
4
votes
1 answer

Is it allowed to remove mounted directory from inside Docker container?

I have a container which is based on tomcat image and I have mounted 'webapps' folder to hosted machine directory '/app/webapps'. Now for some updations I want to remove this webapps folder from inside the container but when I execute command: rm…
Jaffy
  • 141
  • 2
1
2 3
8 9