Difference between revisions of "Docker"
From Wasya Wiki
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
See the README's in docker repo's. | See the README's in docker repo's. | ||
+ | |||
+ | == docker execute command in an image == | ||
+ | docker run -it f0552c086bc6 bash | ||
== Clear unused objects == | == Clear unused objects == | ||
docker system prune | docker system prune | ||
+ | |||
+ | == stop a docker container == | ||
+ | docker container ls | ||
+ | docker rm -f <container-name> | ||
== Host internal name == | == Host internal name == | ||
− | + | host.docker.internal | |
== Login to a hosted mysql == | == Login to a hosted mysql == |
Latest revision as of 21:54, 16 July 2025
See the README's in docker repo's.
Contents
docker execute command in an image
docker run -it f0552c086bc6 bash
Clear unused objects
docker system prune
stop a docker container
docker container ls docker rm -f <container-name>
Host internal name
host.docker.internal
Login to a hosted mysql
mysql -h localhost -P 3306 --protocol=tcp -u root -p
Login to a running container
docker exec -it <container_id> /bin/bash
View logs
docker logs -f <container-id>