Skip to content

Golang for alpine does not honor "static" flags during build #152

@anusha-ragunathan

Description

@anusha-ragunathan

golang:1.6.3-alpine
golang:1.7.1-alpine
golang:1.7.3-alpine

While using any of the above base images to build static go binaries using go install --ldflags '-extldflags "-static"' , only dynamic binaries are build.

As an alternative, using alpine as a base image and RUN apk add make go git gcc libc-dev works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions