Most viewed questions in Docker

+15 votes
19 answers

How can I run a ‘docker exec’ command inside a docker container?

you can run any command in a ...READ MORE

Dec 10, 2018 in Docker by Pramiti
1,229,159 views
+5 votes
3 answers

Copying files from host to Docker container

Hi, You can use the docker cp command ...READ MORE

Dec 9, 2020 in Docker by MD
• 95,460 points
349,608 views
+3 votes
12 answers

How to run multiple commands in docker at once?

In order to run multiple commands in ...READ MORE

Jul 19, 2018 in Docker by Sophie may
• 10,620 points
249,945 views
+1 vote
1 answer

Error: error response from daemon get https //registry-1.docker.io/v2/ connection refused

Hi@akhtar, Sometimes it happens. I also faced this ...READ MORE

Aug 27, 2020 in Docker by MD
• 95,460 points

reshown Nov 22, 2023 by Soumya 224,917 views
+1 vote
1 answer

How to install packages in a Docker container?

Hi@akhtar, To install packages in a docker container, ...READ MORE

Apr 15, 2020 in Docker by MD
• 95,460 points
146,319 views
+4 votes
7 answers

If conditional in docker file

First of all, create a build_internal.sh file ...READ MORE

May 29, 2018 in Docker by DareDev
• 6,890 points
122,997 views
+3 votes
4 answers

How do I execute multiple commands using docker-compose

It can be solve by using bash -c ...READ MORE

Sep 20, 2018 in Docker by shubham
• 7,340 points
110,753 views
0 votes
1 answer

Error starting daemon: pid file found, ensure docker is not running or delete /var/snap/docker/179/run/docker.pid

Hi@akhtar, It means the previous PID file of ...READ MORE

Apr 14, 2020 in Docker by MD
• 95,460 points
67,081 views
0 votes
7 answers

docker: executable file not found in $PATH

try to build the image with --no-cache. I ...READ MORE

Nov 1, 2020 in Docker by Deeptesh Agrawal
62,521 views
+4 votes
4 answers

How to install packages inside a docker Ubuntu image?

Execute the update and the install command ...READ MORE

Apr 24, 2019 in Docker by Vismaya
46,810 views
0 votes
4 answers

I'm trying to run docker with Jenkins pipeline but I'm facing this Jenkins pipeline error and a socket.io error.

This happens when the Jenkins user is ...READ MORE

Jun 26, 2018 in Docker by Sophie may
• 10,620 points
46,139 views
+1 vote
1 answer

How to rename Docker images without rebuilding it?

Hi@akhtar, You can rename your docker image by ...READ MORE

May 19, 2020 in Docker by MD
• 95,460 points
41,885 views
+2 votes
6 answers

copy directories in docker container excluding any one directory

One of the way could be copy ...READ MORE

Dec 10, 2018 in Docker by Prateek
34,535 views
+4 votes
4 answers

How To Access a Service on Host From a Docker Container?

Adding to kalgi's answer, You can also ...READ MORE

Oct 16, 2018 in Docker by lina
• 8,220 points

edited Oct 16, 2018 by lina 33,989 views
+1 vote
1 answer

How to expose docker container's ip and port to outside docker host without port mapping?

you can accomplish this with IP aliasing ...READ MORE

Aug 2, 2018 in Docker by Kalgi
• 52,360 points

edited Jan 16, 2020 by Kalgi 31,499 views
0 votes
2 answers

Docker: unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx

Very cliche, but check if the Dockerfile ...READ MORE

Apr 23, 2019 in Docker by Umer
28,769 views
0 votes
1 answer

How is docker machine different from docker engine?

Docker machine is different from Docker engine ...READ MORE

Jul 4, 2019 in Docker by Sirajul
• 59,230 points
28,660 views
+1 vote
2 answers

How do I copy a file from docker container to host?

Here is a way which you can ...READ MORE

Aug 28, 2018 in Docker by Damon Salvatore
• 5,980 points
28,514 views
0 votes
2 answers

Error saying " "hosts" E212: Can"t open file for writing" when trying to change host name on the VM

I am interested in the answer as ...READ MORE

Jan 26, 2019 in Docker by anonymous
28,427 views
0 votes
1 answer

How do I start a Docker container with a volume?

You can first create the volume and ...READ MORE

Jul 2, 2019 in Docker by Namik
• 1,230 points
25,099 views
0 votes
2 answers

What is docker system prune is used for?

The basic usage of the command docker ...READ MORE

Aug 5, 2019 in Docker by Sirajul
• 59,230 points
24,253 views
+2 votes
2 answers

COPY failed: stat /var/lib/docker/tmp/docker-builder/root/page: no such file or directory

I have faced the same error in ...READ MORE

Dec 3, 2020 in Docker by Tabish Ali
23,505 views
+1 vote
5 answers

Set containers timezones by using docker compose.

version "2" services: serviceA: ...READ MORE

Jul 9, 2018 in Docker by Atul
• 10,240 points
23,407 views
0 votes
1 answer

Dockerfile to install apache server and start httpd service on it.

Hey @Kali, That's pretty simple. You could have ...READ MORE

Jan 22, 2019 in Docker by Yesha
23,276 views
+1 vote
4 answers

COPY is not working in Docker

I had the exact same issue. I ...READ MORE

May 6, 2019 in Docker by Emilia
22,226 views
–1 vote
1 answer

Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.

Hi@akhtar, The secret very much depends on swarm mode ...READ MORE

Aug 17, 2020 in Docker by MD
• 95,460 points
21,547 views
0 votes
2 answers

How to open docker containers file system?

Adding on to @DareDev's answer there's one ...READ MORE

Aug 5, 2019 in Docker by Sirajul
• 59,230 points
20,422 views
0 votes
1 answer

How to fix unhealthy Docker Container? what could be the reason behind unhealthy status?

Restarting of unhealthy container feature was in ...READ MORE

Oct 30, 2020 in Docker by Rajendra
20,396 views
0 votes
1 answer

How can I install systemctl tool in Docker container?

Hi@akhtar, In docker container if you want to ...READ MORE

Feb 5, 2020 in Docker by MD
• 95,460 points
20,115 views
0 votes
1 answer

How to run firefox inside docker container?

Hi@akhtar, Generally, if you run firefox inside docker ...READ MORE

Apr 16, 2020 in Docker by MD
• 95,460 points
19,857 views
0 votes
1 answer

Error:Failed to start redis.service Unit redis-server.service is masked

Hello, If redis.service file is missed in directory path /etc/systemd/system/redis.service so we ...READ MORE

May 18, 2020 in Docker by Niroj
• 82,880 points
19,577 views
0 votes
1 answer

Dockerfile to install nginx on Ubuntu

Hey @Greg, this is a simple dockerfile ...READ MORE

Jul 23, 2019 in Docker by User101
18,705 views
+3 votes
4 answers

Not able to connect worker nodes to the swarm. Connection refused error

This definitely has to be a firewall issue. ...READ MORE

Apr 26, 2019 in Docker by Vaidya
18,671 views
0 votes
1 answer

iptables v1.6.0: can't initialize iptables -F: Permission denied (you must be root)

Hi@akhtar, You may get this error, if you didn't ...READ MORE

May 12, 2020 in Docker by MD
• 95,460 points
18,556 views
+1 vote
5 answers

My docker container has no internet

Try resetting all the parameters pkill docker iptables -t ...READ MORE

Jul 31, 2018 in Docker by Kalgi
• 52,360 points
18,340 views
0 votes
2 answers

How to edit file after I shell to a docker container?

You can even install it using a ...READ MORE

Apr 23, 2019 in Docker by Ashish
17,786 views
0 votes
1 answer

mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied

Hi@akhtar, You are getting this error because Grafana ...READ MORE

Sep 7, 2020 in Docker by MD
• 95,460 points
17,609 views
0 votes
1 answer

How to enable SSH inside Docker container?

Hi@akhtar, To enable SSH inside Docker Container, you ...READ MORE

Jun 4, 2020 in Docker by MD
• 95,460 points
17,580 views
0 votes
1 answer

Job for docker.service failed because the control process exited with error code.

Hi@akhtar, Before starting your docker service check if ...READ MORE

Apr 14, 2020 in Docker by MD
• 95,460 points
16,788 views
0 votes
1 answer

what are the different types of docker networking drivers ?

Docker’s networking subsystem is pluggable using drivers. ...READ MORE

Jul 5, 2019 in Docker by Sirajul
• 59,230 points
16,527 views
0 votes
3 answers

Error: docker command not found

If you're using Docker as an administrator, ...READ MORE

Apr 29, 2019 in Docker by Naina
16,334 views
+1 vote
1 answer

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Hi@akhtar, It seems the docker service is not ...READ MORE

Dec 24, 2020 in Docker by MD
• 95,460 points
15,444 views
0 votes
5 answers

denied: requested access to the resource is denied : docker

You need to tag your image before ...READ MORE

Jul 27, 2018 in Docker by Kalgi
• 52,360 points
14,941 views
0 votes
1 answer

build context for docker image very large

The Docker client sends the entire "build ...READ MORE

Aug 1, 2018 in Docker by Kalgi
• 52,360 points
14,611 views
0 votes
1 answer

[ERROR] [Entrypoint]: Database is uninitialized and password option is not specified

Hi@akhtar, As we know mysql database requires user ...READ MORE

Apr 14, 2020 in Docker by MD
• 95,460 points
14,509 views
+1 vote
4 answers

Communication between multiple docker-compose projects

You just need to make sure that ...READ MORE

Jul 30, 2018 in Docker by Kalgi
• 52,360 points
14,477 views
0 votes
2 answers
0 votes
1 answer

How to Backup, Restore or Migrate data volumes in a docker container?

Steps to Backup a container 1)     ...READ MORE

Jul 3, 2019 in Docker by Sirajul
• 59,230 points
14,057 views
0 votes
1 answer

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)

Hi@akhtar, To install any software using non root ...READ MORE

Jun 6, 2020 in Docker by MD
• 95,460 points
13,436 views
0 votes
1 answer

Using SSH keys inside docker container

Turns out when using Ubuntu, the ssh_config ...READ MORE

Jul 18, 2018 in Docker by Nilesh
• 7,060 points
12,642 views