Part 5: Importing
earthly --artifact github.com/earthbuild/earthbuild/examples/tutorial/go:main+part5/part5 ./part5Calling on Targets From Other Earthfiles
VERSION 0.8
FROM golang:1.15-alpine3.13
WORKDIR /go-workdir
deps:
COPY go.mod go.sum ./
RUN go mod download
# Output these back in case go mod download changes them.
SAVE ARTIFACT go.mod AS LOCAL go.mod
SAVE ARTIFACT go.sum AS LOCAL go.sum
build:
FROM +deps
COPY main.go .
RUN go build -o output/example main.go
SAVE ARTIFACT output/example AS LOCAL local-output/go-example
Importing Whole Projects
More Examples
Last updated