I summarized the flow when I want to enter the container in the terminal and try the command again.
docker build
docker build -t test .
docker build
: Based on Dockerfile, start Docker container, configure, create Docker image at once
-t test
: Give an arbitrary image name with the -t option
.
: The period at the end is to specify the directory where the Dockerfile is located. The period indicates the current directory
docker run
docker run --rm -it test bash
--rm
: Deleted after executing the container
-it
: Output the result to the console
bash
: Start bash
docker rmi
docker rmi test
Specify the image with and delete
Thank you for reading to the end: bow_tone1: I am learning React and Rails from an inexperienced state because I am changing jobs. As I continue to post, I think that the input for that will inevitably increase, leading to growth. I think there are many things that are wrong with the content of the post and that should be added, so I would appreciate it if you could point out. Thank you for reading this article. Thank you!
Recommended Posts