Currently I’m planning to dockerize some web applications but I didn’t find a reasonably easy way do create the images to be hosted in my repository so I can pull them on my server.
What I currently have is:
- A local computer with a directory where the application that I want to dockerize is located
- A “docker server” running Portainer without shell/ssh access
- A place where I can upload/host the Docker images and where I can pull the images from on the “Docker server”
- Basic knowledge on how to write the needed
Dockerfile
What I now need is a sane way to build the images WITHOUT setting up a fully featured Docker environment on the local computer.
Ideally something where I can build the images and upload them but without that something “littering Docker-related files all over my system”.
Something like a VM that resets on every start maybe? So … build the image, upload to repository, close the terminal window, and forget that anything ever happened.
What is YOUR solution to create and upload Docker images in a clean and sane way?
I build, configure, and deploy them with nix flakes for maximum reproducibility. It’s the way you should be doing it for archival purposes. With this tech, you can rebuild any docker image identically to today’s in 100 years.
https://youtu.be/0uixRE8xlbY?si=NIIFyzRhXDmcU8Kh
and here’s a link to a blog post, showing how to create a docker image and rust dev environment.
https://johns.codes/blog/rust-enviorment-and-docker-build-with-nix-flakes
I knew you were going to mention nix before reading you post.
::Robert Redford nodding gif::