Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

wys1203/docker-goose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Create a lightweight goose docker image

Goose binary build

Since the goose dependency package go-sqlite3 is base on cgo, we cannot set CGO_ENABLED=0

HINT: -ldflags "-extldflags -static"

FROM golang:alpine AS build-env

RUN set -ex \
        && apk add --no-cache --virtual build-dependencies \
            build-base \
            git \
        && go get -ldflags "-extldflags -static" bitbucket.org/liamstask/goose/cmd/goose \
        && apk del build-dependencies

FROM alpine

COPY --from=build-env /go/bin/goose /usr/local/bin/goose

ENTRYPOINT ["/usr/local/bin/goose"]
CMD ["--help"]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published