anatol / pacoloco

Caching proxy server for Arch Linux pacman
MIT License
216 stars 30 forks source link

Compile Docker image with CGO enabled #34

Closed anatol closed 2 years ago

anatol commented 2 years ago

It required by go-sqlite3 dependency.

pacoloco | prefetch.go:67: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub pacoloco exited with code 1

Closes #33

anatol commented 2 years ago

cc @ilyazzz could you please review this change?

ilya-zlobintsev commented 2 years ago

This isn't going to work as the resulting imagine is currently based on scratch, which is an empty image with no libc of any kind. This is why CGO_ENABLED=0 is needed - to produce a fully static binary.

I've made a working Dockerfile with the resulting image based on alpine, which allows compilation with CGO and sqlite seems to build and work properly. Should I open a separate PR with it?

anatol commented 2 years ago

Yes please open a new PR. Thank you.