Difference between revisions of "Docker"

From Wasya Wiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
== host internal name ==
+
See the README's in docker repo's.
* host.docker.internal
+
  
== docker build and push ==
+
== Clear unused objects ==
 +
  docker system prune
  
Login, then:
+
== stop a docker container ==
 +
  docker container ls
 +
  docker rm -f <container-name>
  
  docker build . -f Dockerfile-php73 -t php73:0.0.1
+
== Host internal name ==
  docker tag 7727bbb2c924 piousbox/wordpress_6:0.0.0
+
host.docker.internal
  docker push piousbox/php73:0.0.0
+
 
+
= Troubleshoot =
+
  
 
== Login to a hosted mysql ==
 
== Login to a hosted mysql ==
Line 20: Line 19:
  
 
  docker exec -it <container_id> /bin/bash
 
  docker exec -it <container_id> /bin/bash
 
./scripts/login
 
  
 
== View logs ==
 
== View logs ==
 
  docker logs -f <container-id>
 
  docker logs -f <container-id>

Latest revision as of 17:42, 21 March 2024

See the README's in docker repo's.

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>