File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM golang:1.15-alpine AS builder
1+ FROM --platform=$BUILDPLATFORM golang:1.15-alpine AS builder
2+
3+ ARG TARGETOS
4+ ARG TARGETARCH
5+
26RUN mkdir /build
37ADD . /build
48WORKDIR /build
5- RUN go build -o tcp-go-echo .
9+ RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o tcp-go-echo .
610
7-
8- FROM alpine
11+ FROM --platform=$TARGETPLATFORM alpine
912RUN mkdir /app
1013WORKDIR /app
1114COPY --from=builder /build/tcp-go-echo /app
1215CMD ["/app/tcp-go-echo" ]
13-
Original file line number Diff line number Diff line change 1+
2+ IMAGE_NAME = quay.io/skupper/tcp-go-echo
3+ PLATFORM = linux/amd64,linux/arm64
4+
5+ # The option below creates the images in the docker format.
6+ # That is required for their use with Openshift 3.11
7+ FORMAT_OPTIONS = --format docker
8+
9+ .DEFAULT_GOAL := build
10+
11+ build : clean
12+ podman build --no-cache --platform $(PLATFORM ) --manifest $(IMAGE_NAME ) $(FORMAT_OPTIONS ) .
13+
14+ push :
15+ podman manifest push $(IMAGE_NAME )
16+
17+ clean :
18+ -podman manifest rm $(IMAGE_NAME )
19+
20+ check :
21+ podman manifest inspect $(IMAGE_NAME )
You can’t perform that action at this time.
0 commit comments