Select Page

What to do if you cannot stop or kill Docker container

It happened to me several times when I made some changes in configuration files and restarted container to apply changes. From time to time happened that configuration had some problem and container was not running properly but kept restarting itself. Usually happened...

Docker – small notes

How to show parameters of running images: sudo docker inspect  -f "{{.Path}} ({{.Id}}) {{json .Config}}" $(sudo docker ps -a -q) – command shows all parameters of each container in json format Show messages from container start/ stop: sudo docker events Show log...

docker build – small notes

If you develop new image it happens some builds failed. It such case you could use this small “one line” script to delete failed images: for id in $(sudo docker images|tr -s ' '|grep '^<none>'|cut -d' ' -f3); do echo $id; sudo docker rmi $id -f; done...

Dockerfile – small notes

Command “docker file” uses /bin/sh shall – on github people state it is hardcoded. But you can overcome this limitation placing this command into Dockerfile: RUN rm /bin/sh && ln -s /bin/bash /bin/sh Build has its step-scopes. For example – If...

docker – basic usage

Depending on how installation was done you would need (or not need) to run these commands with sudo. start container detached: docker -d .... see events from docker (in second terminal): docker events show running containers: docker ps bash shell directly on...