New answers tagged docker
0
votes
How to install specific docker version from apt-cache policy docker-ce candidate list
I came here searching for a way to select a specific version of docker-ce from the official repositories, while beeing able to use apt upgrade for updating patch versions.
This is my solution:
# /etc/...
1
vote
Can't install software-properties-common on Ubuntu 20.04 docker image
This is the only thing I was able to get to work:
RUN apt install -y -f software-properties-common || sudo dpkg --configure -a && apt install -y -f software-properties-common|| sudo dpkg --...
0
votes
Edit host machine's network from inside Docker container
As vidarlo already mentioned, it's possible, but maybe not the best idea. I had a similar issue, wehere I needed to change some network configuration settings but I had to use a docker container. I ...
1
vote
Problem with WSL-Ubuntu-20.04 on Windows: "Cannot connect to the Docker daemon" and "System has not been booted with systemd as init system (PID 1)."
In addition to the (excellent) answer by NotTheDr01ds, you can also run the Docker daemon directly. The command dockerd does that, so you could run sudo dockerd in another WSL window/tab
tmux is ...
3
votes
Problem with WSL-Ubuntu-20.04 on Windows: "Cannot connect to the Docker daemon" and "System has not been booted with systemd as init system (PID 1)."
There are at least three possible solutions here:
First, as @ArturMeinild mentioned in the close-vote/comments, the core issue here is that sudo systemctl start docker assumes that you are running ...
1
vote
Accepted
Cannot run docker container with --gpu all
It's common for the issue to arise when the NVIDIA driver is installed using Ubuntu's ubuntu-drivers install tool. To resolve it, you may need to reinstall the driver. First, the existing driver needs ...
-1
votes
How to install latest node inside a docker container
# Base OS
FROM ubuntu:latest
# Node installation
RUN apt -y install nodejs npm
# Node package manager
RUN npm install -g n
# Upgrade to latest stable version
RUN n stable
0
votes
looking for docker-compose in the wrong directory
Check if the installed directory is in the PATH as explained by @Omegamormegil.
After that exit all the terminals and then open the terminal again.
Hopefully it should fix the problem.
1
vote
How to fix the "Unit docker.service could not be found." error?
This option helped me:
1.
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
2.
sudo apt-get update
sudo apt-get install ...
0
votes
How to run a docker-compose as a systemd service?
You can also start systemd unit files listed in your user folder, and have them run on a regular basis. E.g. I have a certbot container that runs daily, to keep my ftp server's certificate up-to-date.
...
2
votes
Accepted
Interface between applications running inside and outside a docker container
There are two very obvious interfaces between a Docker Container and the host that you should probably explore further:
Published ports
Bind mounts (persistent storage)
Published ports
One option ...
-1
votes
Accepted
.docker folder in home dir is too large
The thing is I may have myself specified that much pre-occupied space for docker during setting it up.
Go to Docker Desktop > Settings > Resources and adjust the storage according to your needs.
0
votes
How to run a docker-compose as a systemd service?
If you use restart: always in your docker compose file (which is fairly typical), then the docker daemon will automatically restart the container when the daemon itself starts up -- which means that ...
2
votes
.sh file execution: permission denied exit code 126
The bash manual explains it:
If a command is not found, the child process created to execute it returns a status of 127. If a command is found but is not executable, the return status is 126.
You ...
4
votes
Docker-compose giving 'ContainerConfig' errors after update today
..and if, like me, you were calling docker-compose via ansible then you'll need to upgrade
community.docker.docker_compose:
to
community.docker.docker_compose_v2:
and possibly make some other changes ...
0
votes
Docker-compose giving 'ContainerConfig' errors after update today
Sometimes you got this because you have running containers.
I got this error once with my ansible playbook and this works for me.
- name: stopping existing container
shell:
chdir: &...
37
votes
Accepted
Docker-compose giving 'ContainerConfig' errors after update today
Same here. After changing from docker-compose to docker compose it works with no other changes.
Now, my containers are running with:
docker compose up -d
instead of:
docker-compose up -d
This is ...
4
votes
Docker-compose giving 'ContainerConfig' errors after update today
I ran into the same problem today.
docker-compose down
It worked for me
Top 50 recent answers are included
Related Tags
docker × 1261apt × 152
server × 127
networking × 110
18.04 × 103
20.04 × 98
16.04 × 78
container × 68
permissions × 58
package-management × 56
22.04 × 49
command-line × 46
14.04 × 45
software-installation × 43
bash × 40
systemd × 37
snap × 35
nvidia × 27
windows-subsystem-for-linux × 27
python × 26
virtualbox × 25
dns × 25
iptables × 25
mount × 24
ssh × 23