Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. VERSION="1.0.0"
  2. docker-build:
  3. @-docker rmi docker-mysql-server-fixed:latest
  4. docker build -t docker-mysql-server-fixed:latest ./
  5. docker-export:
  6. @-rm ./build/docker-mysql-server-fixed.tar
  7. docker save docker-mysql-server-fixed:latest > ./build/docker-mysql-server-fixed.tar
  8. docker-import:
  9. @-docker rmi docker-mysql-server-fixed:latest
  10. docker load < ./build/docker-mysql-server-fixed.tar
  11. docker-test:
  12. docker run --rm \
  13. --network host \
  14. --name docker-mysql-server-fixed-test \
  15. -e MYSQL_ROOT_PASSWORD="root" \
  16. -e MYSQL_DATABASE="my_test_base" \
  17. -e MYSQL_USER="my_test_user" \
  18. -e MYSQL_PASSWORD="my_test_pass" \
  19. -v /etc/timezone:/etc/timezone:ro \
  20. -it docker-mysql-server-fixed:latest
  21. docker-push:
  22. docker tag docker-mysql-server-fixed:latest vladimirok5959/mysql-server-fixed:${VERSION}
  23. docker tag docker-mysql-server-fixed vladimirok5959/mysql-server-fixed:latest
  24. docker login
  25. docker push vladimirok5959/mysql-server-fixed:${VERSION}
  26. docker push vladimirok5959/mysql-server-fixed:latest
  27. docker rmi vladimirok5959/mysql-server-fixed:${VERSION}
  28. docker rmi vladimirok5959/mysql-server-fixed:latest
  29. docker rmi docker-mysql-server-fixed:latest