Difference between revisions of "Docker"

From Wasya Wiki
Jump to: navigation, search
(docker build and push)
Line 4: Line 4:
  
 
== docker build and push ==
 
== docker build and push ==
Login, build, then:
+
 
 +
Login, then:
 +
 
 +
  docker build . -f Dockerfile-php73 -t php73:0.0.1
 
   docker tag 7727bbb2c924 piousbox/wordpress_6:0.0.0
 
   docker tag 7727bbb2c924 piousbox/wordpress_6:0.0.0
 
   docker push piousbox/php73:0.0.0
 
   docker push piousbox/php73:0.0.0

Revision as of 20:23, 8 May 2023

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>