How can I stop and remove all docker containers to create a clean slate with my Docker containers? Lots of times I feel it is easier to start from scratch, but I have a bunch of containers that I a...
Docker events command may help and Docker logs command can fetch logs even after the image failed to start. First start docker events in the background to see whats going on.
Using docker-compose, you can inherit environment variables in docker-compose.yml and subsequently any Dockerfile (s) called by docker-compose to build images. This is useful when the Dockerfile RUN command should execute commands specific to the environment.
net/http: TLS handshake timeout means that you have slow internet connection. Default value of connection timeout is too small for your environment. Unfortunately docker don't have any settings that allows you change connection timeout. You may try to create your own registry cache somewhere else and pull images from it.
Here are some related resources: openssh-server doesn't start in Docker container How to get bash or ssh into a running container in background mode? Can you run GUI applications in a Linux Docker container? Other useful approaches for graphical access found with search: Docker X11 If you run SSHD in your Docker containers, you're doing it wrong!
You can use docker commit to persist the current state of your container in a new image, and start an interactive container from this image to inspect the contents. From the documentation : It can be useful to commit a container’s file changes or settings into a new image. This allows you debug a container by running an interactive shell, or to export a working dataset to another server ...
After doing the steps above I got rid of x509: certificate signed by unknown authority but then I got 401 Unauthorized errors. To solve I needed to docker login <docker registry>
On Docker v19.03.8 for Windows, I added the graph parameter to my config, and it worked for me, but apparently, this parameter is deprecated and we should now use data-root instead. The default value for data-root is c:\programdata\docker. Beware that in the JSON configuration file the backslashes need to be escaped.
TL;DR/Notice: If you experience a directory being created in place of the file you are trying to mount, you have probably failed to supply a valid and absolute path. This is a common mistake with a silent and confusing failure mode. File volumes are done this way in docker (absolute path example (can use env variables), and you need to mention the file name) :
Due to problems with captive portals and the default Docker IP range I am trying to make Docker use the 198.18.0.0 range, instead of 172.17.0.0, which clashes with the captive portals used on the t...