Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 6, 2023 08:46 am GMT

Let's discover: docker init command

Welcome in this new (serie of?) article titled: "Let's discover".

This time, no sketchnotes, but we will discover a new too, a new technology or this time, a new command that I wait for a loooonnggg time: docker init command.

Docker init

In short: docker init allows you to dockerize your application. That's it! :-)

When you execute docker init command in your project, in your repository for example, it generates for you:

  • a Dockerfile
  • a .dockerignore
  • and a docker-compose.yaml file

So after executing docker init command you just have to build and run your container of run it through docker compose and test your application :-).

Test it!

Stop the blahblah, let's discover and test this new docker init command, in video! :-)

As you can see, the docker init command is in Beta and you need to update Docker Desktop to version 4.18.
At the moment it only supports the Go language and the teams are working to support Python, Rust, Node.js, Java and even .Net languages.
If you want a support for a specific language or a framework, you can ask to Docker.

Conclusion

As I said before, I have been waiting for this command for a long time.

I love to fine-tune my DockerFile in order to have small Docker images but I like when things are easy and frictionless and I know it's not easy to create a simple DockerFile when you start (and even when you know Docker technology ^^) so I'm happy with this new feature and I hope it can help a lot of people to start their Docker and Containers journey! :-)


Original Link: https://dev.to/aurelievache/lets-discover-docker-init-command-3cef

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To