How to run MySQL in a Docker container with dockerfile

Random code
Random code
44.1 هزار بار بازدید - 2 سال پیش - I share how we can
I share how we can run MySQL in a docker container from a dockerfile. For some reason, most tutorials do not seem to like docker files, but it is a potent tool, I, therefore, wanted to share how it is done. I showcase the journey from docker file to image to container, and we then jump into the MySQL container to check it is actually working.

Commands:
Build a docker image:
docker build -t [tag] [dockerfile position]

Create and or run Docker container
docker run [docker image]

How to get into a docker container
docker exec -it [docker container] /bin/bash

My channel publishes programming and software engineering videos, especially Java and Python. If that is what you are looking for, do not hesitate to join me on this journey!

Subscribe to my YouTube channel:
@randomcode_0
2 سال پیش در تاریخ 1401/03/01 منتشر شده است.
44,127 بـار بازدید شده
... بیشتر