Sometimes it's just annoying to build a docker image, then run the container from that image. Even if it's only two 2 commands, it can become very annoying when done repetitively.
Luckily, there is a command to run a container directly from a Dockerfile.
The -q
option suppresses the build output and prints image ID on success.
If you have to expose a port for your container, you can just add the -p
flag to your command, and there you go!
Author : Kevin Kouomeu
I hope you enjoyed reading this, and I'm curious to hear if this tutorial helped you. Please let me know your thoughts below in the comments. Don't forget to subscribe to my newsletter to avoid missing my upcoming blog posts.
You can also find me here LinkedIn • Twitter • GitHub or Medium
I hope you enjoyed reading this, and I'm curious to hear if this tutorial helped you. Please let me know your thoughts below in the comments. Don't forget to subscribe to my newsletter to avoid missing my upcoming blog posts.
You can also find me here LinkedIn • Twitter • GitHub or Medium