testing your app as-a-container locally before pushing is a worthwhile check to ensure you don’t have config/startup issues
learning docker is a separate skill, yet is versatile, you can wrap anything in an OCI image
My suggestions:
1. Start with a specific OS on a linux box. Ubuntu is a standard one that you can just start with.
2. Install your application first without docker. If binary (e.g. Golang), you can literally copy the binary (make sure you build it for your OS on the server) and then run it either using something ike supervisor/systemd
3. Then, use a reverse proxy like Caddy in front of it for SSL and actual domain.
4. Get a custom domain from any provider and set the DNS for that domain to point to the IP address of this server.
5. If you want to get real fancy, instead of pointing d0main directly to the IP of the server, get a DNS with cloudflare and point there. Then configure cloudflare to point to the actual server (a.k.a origin server) This way, you get additional benefits like WAF, DDOS protection etc. Even cloudflare free plan offers this with some limits.
Then repeat the process in 2,3 but with docker container.
You can do all of this easily in ChatGPT etc nowadays by asking:
- I want to install a Go App on an Ubuntu VPS using systemd/supervisor and put Caddy as reverse proxy in front. Then I will want to use a custom domain where DNS is hoted with Cloudflare which ultimately points to Caddy.
It is not that hard. Not to learn at least.
You've reached the end!
uberman•13h ago
Installing docker is generally simple. Docker desktop on windows or just follow the steps in the docks for linux.
Reading and using a simple dockerfile is also dead simple.
Understanding compose and port and volume mapping is a bit trickier but not daunting.
Once you have the basics of understanding a dockerfile you can switch to doing container based development in vscode and you will never go back to writing code on your host again.
Vscode is not the only ide that supports this, just the one I use most of the time. There are also docker alternatives like rancher and postman but I still use docker when doing dec work.
Good luck. Bit of beginner advice though. Take time to understand the differences between: build, up, down, stop, start