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
Andrea Luzzardi 5ba6dd1617 embedded stdlib
This PR embeds the stdlib into the dagger binary itself for convenience.
Long term we will want to source the stdlib directly from git.

- Updated go to 1.16 to use the new built-in embedding functionality
- The `stdlib` go package now contains an embed of the stdlib

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-17 10:08:56 -08:00

13 lines
446 B
Docker

# syntax = docker/dockerfile-upstream:experimental@sha256:398a0a10f19875add7fe359a37f2f971c46746b064faf876776ae632a3472c37
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"]