Developing and testing APIs locally connected to a database is no joke. The database often becomes a pain point. However, using Docker, the process...
For further actions, you may consider blocking this person and/or reporting abuse
I love these kind of posts!
Thank you so much, Francesco!
you know I love this sort of stuff for real ahah. I am planning another one but it's still in the process
I KNOW! I can't wait to hear more about it!
Good one, @pradumnasaraf brother. I am also starting with Golang these days. Really helpful. 🤍
Thnak you for reading, Shrijal
Thank for sharing
Thank you for reading, Mohamed
As I'm learning Docker this helped me alot💖
Thnak you for reading, Luv
Good job!!!
Thnak you for reading, Felipe
For go, since everything is compiled into the binary, you should consider using distroless images as your base.
They're smaller than Alpine, but should have all the necessary files (like timezone files, and ssl certs) that you should need.
Just change:
To:
That should save you a bit of space on your final image without sacrificing functionality.
You could also, if you really want to strip it down, do
FROM scratch
, and copy over SSL certs and timezone files from alpine. That should get you what you need for full functionality, and an absolute minimum image size. But, there might be some other OS dependencies that aren't obvious, which is why I usually use distroless, just in case.Here's another really good approach that also uses
FROM scratch
.Thank you for the health-check on the docker-compose. Really helpful!