f95fa199ab
Bumps golang from 1.16.13-alpine to 1.16.14-alpine. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
15 lines
419 B
Docker
15 lines
419 B
Docker
# syntax = docker/dockerfile:1.2
|
|
|
|
FROM golang:1.16.14-alpine AS build
|
|
WORKDIR /src
|
|
RUN apk add --no-cache file
|
|
ENV GOMODCACHE /root/.cache/gocache
|
|
RUN --mount=target=. --mount=target=/root/.cache,type=cache \
|
|
CGO_ENABLED=0 go build -o /out/dagger -ldflags '-s -d -w' ./cmd/dagger; \
|
|
file /out/dagger | grep "statically linked"
|
|
|
|
FROM scratch
|
|
COPY --from=build /out/dagger /bin/dagger
|
|
ENTRYPOINT ["/bin/dagger"]
|
|
|