Containerize Go and SQLite with Docker
awstip.com
Containerize Go and SQLite with Docker
1–10 of 90 posts
Re: Containerize Go and SQLite with Docker
#2See also: -trimpath
Re: Containerize Go and SQLite with Docker
#3Re: Containerize Go and SQLite with Docker
#4This is really interesting. Copying to the scratch container is powerful and I’ve used it a lot, regularly, but occasionally something comes up where I need to use a more fully featured base to support things. One other downside I’ve encountered with Scratch is no shell so doing docker exec or kubectl exec doesn’t work. Does anyone know a good solution to this problem?
Re: Containerize Go and SQLite with Docker
#5Add -ldflags '-s -w' to go build to strip DWARF, symbol table and debug info. See also: -trimpath
https://blog.filippo.io/shrink-your-go-binaries-with-this-on...
Re: Containerize Go and SQLite with Docker
#6This is really interesting. Copying to the scratch container is powerful and I’ve used it a lot, regularly, but occasionally something comes up where I need to use a more fully featured base to support things. One other downside I’ve encountered with Scratch is no shell so doing docker exec or kubectl exec doesn’t work. Does anyone know a good solution to this problem?
Re: Containerize Go and SQLite with Docker
#7This is really interesting. Copying to the scratch container is powerful and I’ve used it a lot, regularly, but occasionally something comes up where I need to use a more fully featured base to support things. One other downside I’ve encountered with Scratch is no shell so doing docker exec or kubectl exec doesn’t work. Does anyone know a good solution to this problem?
Re: Containerize Go and SQLite with Docker
#8Add -ldflags '-s -w' to go build to strip DWARF, symbol table and debug info. See also: -trimpath
And if you can spare an extra ~150ms startup time: https://blog.filippo.io/shrink-your-go-binaries-with-this-on...
goupx is not necessary after go 1.6. https://github.com/pwaller/goupx#update-20160310
Re: Containerize Go and SQLite with Docker
#9This is really interesting. Copying to the scratch container is powerful and I’ve used it a lot, regularly, but occasionally something comes up where I need to use a more fully featured base to support things. One other downside I’ve encountered with Scratch is no shell so doing docker exec or kubectl exec doesn’t work. Does anyone know a good solution to this problem?
Re: Containerize Go and SQLite with Docker
#10This is really interesting. Copying to the scratch container is powerful and I’ve used it a lot, regularly, but occasionally something comes up where I need to use a more fully featured base to support things. One other downside I’ve encountered with Scratch is no shell so doing docker exec or kubectl exec doesn’t work. Does anyone know a good solution to this problem?