This repository has been archived by the owner on Nov 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM --platform=${BUILDPLATFORM} golang:1.18 as builder | ||
ADD . /build | ||
ARG TARGETOS TARGETARCH | ||
WORKDIR /build/ | ||
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build | ||
|
||
FROM --platform=${TARGETPLATFORM} alpine:3.17 | ||
ARG TARGETOS TARGETARCH | ||
WORKDIR / | ||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \ | ||
apk add ca-certificates bash libc6-compat iptables ip6tables && update-ca-certificates && rm /var/cache/apk/* | ||
COPY --from=builder /build/_output/bin/${TARGETOS}/${TARGETARCH}/yurt-device-controller /yurt-device-controller | ||
ENTRYPOINT ["/yurt-device-controller"] |