@tobi: golang alpine image with cgo for sqlite3

Picking up go is a lot of fun! So does a few of my colleagues :-) Tobi M. (“the destroyer”) asked if i have a solution to run a golang docker image with the go-sqlite3 driver I remembered to had the same problem, so after my post about really small docker images, lets add a few more bytes! the solution This solution is not my own, i found and tried other solutions but stayed with this Dockerfile on github...

building go binaries for small docker images

building docker images with go should be super easy - picking a minimal image (in my case I build from alpine), build the binary, ADD to the image, run… the problem your app is not starting, instead you see something like this standard_init_linux.go:195: exec user process caused "no such file or directory" cause: several modules are calling C code via cgo, and cgo depends on libc. Go found libc on the system it was build on, so it linked to it....

setting up continuous delivery with drone

Long, long time ago, i started to manage my spare time projects with git, to make life a bit easier there were tools like gitosis and later gitolite - you managed repositories and public keys in plain text files and git hooks on the server. Last year i decided to join the shiny new world of modern self-hosting git services. I choose Gitea - copied it on the server, started one 40 mb binary, and it was just working - and it was fast....

Last posts

Tags