Live data from Hacker News

Containerize Go and SQLite with Docker

awstip.com

21–30 of 90 posts

Re: Containerize Go and SQLite with Docker

#21
> C libraries are required to interact with SQLite

Or: modernc.org/sqlite (plus https://github.com/zombiezen/go-sqlite), "an automatically generated translation of the original C source code of SQLite into Go"

as mentioned yesterday: https://news.ycombinator.com/item?id=29959193#29960726

Re: Containerize Go and SQLite with Docker

#27
post #23

If you are using Go (which solves most of your dependency problems) and SQLite (which means you don't need to integrate with an external database via service discovery) why do you need Docker at all?

Perhaps because Docker has great stories for deployment. Many of the complexities of deployment are handled for you (writing a systemd unit, managing rollback, etc).

Re: Containerize Go and SQLite with Docker

#28
post #23

If you are using Go (which solves most of your dependency problems) and SQLite (which means you don't need to integrate with an external database via service discovery) why do you need Docker at all?

Perhaps because Docker has great stories for deployment. Many of the complexities of deployment are handled for you (writing a systemd unit, managing rollback, etc).

Docker isn't a cache-all for containers. Docker has a pretty terrible deployment story at this point and I forsee in a couple years it will probably be considered legacy compared to Podman/K3d/Local K8s/etc

Re: Containerize Go and SQLite with Docker

#30
post #18

Earlier quoted context omitted.

If you run a single process in a Docker container, have it output logs over STDOUT, and have no meaningful way to interact with it other than shutting it down, you don't have much need for a shell. It can't do anything in the container anyhow. By contrast, if you've basically got a full OS in there, then yeah, a shell is really useful.

I would say most of my Go projects involve what you described (logs to stdout, simple interface) but I often find myself needing a shell to debug my docker build, like ensuring that files have ended up in the correct place, and have the correct contents, within the docker container.

Use Dive for inspecting the image https://github.com/wagoodman/dive&ved=2ahUKEwips5OH0Lr1AhW97...
Post reply on HN