Docker

From Wasya Wiki
Revision as of 18:06, 23 August 2023 by Piousbox (Talk | contribs)

Jump to: navigation, search

clear unused objects

 docker system prune

host internal name

  • host.docker.internal

docker build and push

Login, then:

 docker build . -f Dockerfile-php73 -t php73:0.0.1
 docker tag 7727bbb2c924 piousbox/wordpress_6:0.0.0
 docker push piousbox/php73:0.0.0

Troubleshoot

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
./scripts/login

View logs

docker logs -f <container-id>