Closed auyer closed 5 years ago
Are there other resons why it should be kept at the default golang image, and at the 1.10.4 golang version ?
The fixes I proposed ( gcc and libc-dev ) seem to have solved all cgo problems.
We won't be moving to Golang 1.11 at this stage, please see the tracking issue - I've explained this several times. https://github.com/openfaas/faas/issues/875
I'd also prefer to use the default Golang image over Alpine for consistency. There may be other implications about compiling against musl-dev that are not obvious.
Derek lock: invalid - see tracking issue.
Expected Behaviour
Multistage builds should leave as little junk as possible. Golang alpine 1.11 image fails on cgo dependent tasks.
Current Behaviour
Multistage Docker builds leave the "build" parts in disk as untagged images, ans and using the Fat Golang image in this step produces more than 500Mb.
Possible Solution
Use alpine images. To use the 11.1 Go Alpine image, it is necessary to add
gcc
andlibc-dev
apks to the Dockerfile.Steps to Reproduce (for bugs)
Context
This issue prevent unecessary disk and network usage when deploying on Docker Swarm.
Your Environment
FaaS-CLI version ( Full output from:
faas-cli version
):Docker version
docker version
(e.g. Docker 17.0.05 ): Docker 18.06.1-ceAre you using Docker Swarm or Kubernetes (FaaS-netes)? Docker Swarm
Operating System and version (e.g. Linux, Windows, MacOS): Linux 4.18-amd64 (Arch)
Link to your project or a code example to reproduce issue: fass-swarm