This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/Dockerfile
Kasper Juul Hermansen 0a8548a8e3
Some checks failed
renovate/artifacts Artifact file update failure
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
fix(deps): update all dependencies
2024-03-05 18:21:30 +00:00

15 lines
418 B
Docker

# syntax = docker/dockerfile:1.2
FROM golang:1.22.0-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"]