Skip to content

Commit

Permalink
Setup ci
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Robert Günzler <robertg@balena.io>
  • Loading branch information
robertgzr committed Aug 7, 2020
1 parent f1a6cde commit 5a21605
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
@@ -0,0 +1,19 @@
# syntax=docker/dockerfile:1.1-experimental

FROM --platform=${BUILDPLATFORM} docker.io/tonistiigi/xx:golang AS xx
FROM --platform=${BUILDPLATFORM} golang:alpine AS gobuild

RUN apk add make

WORKDIR /src

COPY --from=xx / /
ARG TARGETPLATFORM
RUN --mount=target=. \
--mount=type=cache,target=/go/pkg \
--mount=type=cache,target=/root/.cache \
make DEST=/out mobynit hostapp.test


FROM scratch AS final
COPY --from=gobuild /out/* /
11 changes: 11 additions & 0 deletions build-docker.sh
@@ -0,0 +1,11 @@
#!/bin/sh
set -ex

mkdir -p "${HERE}"/deploy || true

DOCKER_BUILDKIT=1 \
docker build \
--target=final \
--platform=linux/amd64 \
--output="${HERE}"/deploy \
"${HERE}"
2 changes: 2 additions & 0 deletions repo.yml
@@ -0,0 +1,2 @@
type: build-in-container
reviewers: 1

0 comments on commit 5a21605

Please sign in to comment.