Problem
You have a running docker container running in the background (as a daemon) and you want to connect to it.
Solution
Taken from the answer here, you can use the following to connect to it:
docker exec -i -t name_of_container /bin/bash
Problem
You have a running docker container running in the background (as a daemon) and you want to connect to it.
Solution
Taken from the answer here, you can use the following to connect to it:
docker exec -i -t name_of_container /bin/bash
Problem
After playing around with docker containers for some time the terminated/unused ones are still hanging around your system, and prevent you from using a new container with the same name as any of the previous ones with the error:
Error response from daemon: Conflict. The name "container_name" is already in use by container 61f023f06a98. You have to remove (or rename) that container to be able to reuse that name.
Solution
You can remove all the containers by using the following:
docker rm $(docker ps -aq)
Problem
You are given a patch file to apply to your git repository but using git apply does not work. No errors reported but no changes applied neither.
Solution
Try to use the patch command command possibly with the -p1 parameter like:
patch -p1 < path_to_the_patch_file.patch
NOTE: Make sure that you are in the right folder relative to the file path in the patch file