-
Notifications
You must be signed in to change notification settings - Fork 439
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 745 Bytes
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
ARG BUILDPLATFORM=linux/amd64
ARG BUILD_BASE_IMAGE
ARG BINARY_BASE_IMAGE
FROM --platform=$BUILDPLATFORM $BUILD_BASE_IMAGE AS build
WORKDIR /azure
COPY go.mod go.sum /azure/
RUN go mod download
RUN apt-get update
RUN apt-get install -y ca-certificates
ARG TARGETOS
ARG TARGETARCH
ARG BUILD_TAG
ARG BUILD_DATE
ARG GIT_HASH
COPY cmd cmd
COPY pkg pkg
COPY Makefile Makefile
RUN make build \
GOOS=${TARGETOS} \
GOARCH=${TARGETARCH} \
BUILD_TAG=${BUILD_TAG} \
BUILD_DATE=${BUILD_DATE} \
GIT_HASH=${GIT_HASH}
RUN chmod +x ./bin/appgw-ingress
#RUN ldd ./bin/appgw-ingress 2>&1 | grep 'not a dynamic executable'
FROM $BINARY_BASE_IMAGE AS final
COPY --from=build /azure/bin/appgw-ingress /appgw-ingress
CMD ["/appgw-ingress"]