chore: add Earthfile

This commit is contained in:
Technofab 2023-03-01 19:58:10 +01:00
parent a4613ac56c
commit 629398bcac
No known key found for this signature in database
GPG key ID: A0AA746B951C8830

21
Earthfile Normal file
View file

@ -0,0 +1,21 @@
VERSION 0.6
FROM golang:1.19-alpine
WORKDIR /build
deps:
COPY go.mod go.sum ./
RUN go mod download && go mod verify
build:
FROM +deps
COPY pkg pkg
COPY *.go .
COPY *.libsonnet .
RUN go build -o dist/docsonnet .
SAVE ARTIFACT dist/docsonnet /docsonnet
image:
FROM alpine:3.12
COPY +build/docsonnet /usr/bin/docsonnet
ENTRYPOINT "/usr/bin/docsonnet"
SAVE IMAGE --push docker.io/technofab/docsonnet