This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying two things: - speed up arm build by allowing cross-comp - take a stab at caching builx layers
- Loading branch information
Showing
2 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
FROM golang:1.20-bullseye AS builder | ||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.20-bullseye AS builder | ||
MAINTAINER IPFS Stewards <[email protected]> | ||
|
||
# This dockerfile builds and runs bifrost-gateway | ||
|
||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
ENV GOPATH /go | ||
ENV SRC_PATH $GOPATH/src/github.com/ipfs/bifrost-gateway | ||
ENV GO111MODULE on | ||
|
@@ -34,11 +39,11 @@ RUN go mod download | |
|
||
COPY --chown=1000:users . $SRC_PATH | ||
RUN git config --global --add safe.directory /go/src/github.com/ipfs/bifrost-gateway | ||
RUN go install | ||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o $GOPATH/bin/bifrost-gateway | ||
|
||
|
||
#------------------------------------------------------ | ||
FROM busybox:1-glibc | ||
FROM --platform=${BUILDPLATFORM:-linux/amd64} busybox:1-glibc | ||
MAINTAINER IPFS Stewards <[email protected]> | ||
|
||
ENV GOPATH /go | ||
|