Skip to content

Commit

Permalink
Merge pull request #207 from AliyunContainerService/features/multi-pl…
Browse files Browse the repository at this point in the history
…atform-20211028

Features/multi platform 20211028
  • Loading branch information
ringtail authored Oct 28, 2021
2 parents 452209d + 4511590 commit b06e47b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions deploy/Dockerfile.multi
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM --platform=$BUILDPLATFORM golang:1.14 AS build-env
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG BUILDARCH
ARG TARGETARCH

ADD . /src/github.com/AliyunContainerService/kube-eventer
ENV GOPATH /:/src/github.com/AliyunContainerService/kube-eventer/vendor
ENV GO111MODULE on
ENV GOPROXY=https://goproxy.cn,direct
WORKDIR /src/github.com/AliyunContainerService/kube-eventer
RUN apt-get update -y && apt-get install gcc ca-certificates

RUN echo "I am running on $BUILDPLATFORM $BUILDARCH, building for $TARGETPLATFORM $TARGETARCH"

RUN make ARCH=$TARGETARCH


FROM alpine:3.11.6
LABEL maintainer="KeyOfSpectator <shichun.fsc@alibaba-inc.com>"

COPY --from=build-env /src/github.com/AliyunContainerService/kube-eventer/kube-eventer /
COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

ENV TZ "Asia/Shanghai"
RUN apk add --no-cache tzdata
#COPY deploy/entrypoint.sh /
RUN addgroup -g 1000 nonroot && \
adduser -u 1000 -D -H -G nonroot nonroot && \
chown -R nonroot:nonroot /kube-eventer
USER nonroot:nonroot

ENTRYPOINT ["/kube-eventer"]

0 comments on commit b06e47b

Please sign in to comment.