bc2dae7e32
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
13 lines
356 B
Docker
13 lines
356 B
Docker
# syntax = docker/dockerfile:1.2
|
|
|
|
FROM golang:1.16-alpine AS build
|
|
WORKDIR /src
|
|
RUN apk add --no-cache file
|
|
RUN --mount=target=. --mount=target=/root/.cache,type=cache \
|
|
CGO_ENABLED=0 go build -o /out/dagger ./cmd/dagger && file /out/dagger | grep "statically linked"
|
|
|
|
FROM scratch
|
|
COPY --from=build /out/dagger /bin/dagger
|
|
ENTRYPOINT ["/bin/dagger"]
|
|
|