Skip to content

Commit

Permalink
feat: add docker image on top of earthly
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Brumhard <code@brumhard.com>
  • Loading branch information
brumhard committed Jun 6, 2022
1 parent 2cef13e commit 678d86c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,22 @@ docker:
ARG DOCKER_TAG=$EARTHLY_GIT_SHORT_HASH
SAVE IMAGE --push $DOCKER_REPO:$DOCKER_TAG

earthly:
# earthly is only available as linux/amd64
FROM earthly/earthly:v0.6.15
COPY +build/$NAME /usr/bin/$NAME
RUN earthly config global.secret_provider $NAME
ARG EARTHLY_GIT_SHORT_HASH
ARG DOCKER_TAG=$EARTHLY_GIT_SHORT_HASH
SAVE IMAGE --push $DOCKER_REPO:$DOCKER_TAG-full

multiarch-docker:
ARG EARTHLY_GIT_SHORT_HASH
ARG DOCKER_TAG=$EARTHLY_GIT_SHORT_HASH
BUILD --platform=linux/amd64 +docker --DOCKER_TAG=$DOCKER_TAG
BUILD --platform=linux/arm64 +docker --DOCKER_TAG=$DOCKER_TAG
BUILD --platform=linux/arm/v7 +docker --DOCKER_TAG=$DOCKER_TAG
BUILD +earthly --DOCKER_TAG=$DOCKER_TAG

lint:
ARG GOLANGCI_LINT_CACHE=/golangci-cache
Expand Down

0 comments on commit 678d86c

Please sign in to comment.