Skip to content

Commit

Permalink
ci: update Linux CNS dockerfile (#2637)
Browse files Browse the repository at this point in the history
* ci: update cns dockerfile

* ci: combine install commands
  • Loading branch information
jpayne3506 authored Mar 6, 2024
1 parent cc68e88 commit 03f28b8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cns/linux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
FROM mcr.microsoft.com/cbl-mariner/base/core:1.0 AS certs
RUN tdnf upgrade -y && tdnf install -y ca-certificates

FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS builder
ARG VERSION
ARG CNS_AI_PATH
Expand All @@ -11,13 +8,12 @@ RUN CGO_ENABLED=0 go build -a -o /usr/local/bin/azure-cns -ldflags "-X main.vers
RUN CGO_ENABLED=0 go build -a -o /usr/local/bin/azure-vnet-telemetry -ldflags "-X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" cni/telemetry/service/*.go

FROM mcr.microsoft.com/cbl-mariner/base/core:2.0
RUN tdnf install -y iptables
RUN tdnf upgrade -y && tdnf install -y ca-certificates iptables
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/group /etc/group
COPY --from=builder /usr/local/bin/azure-cns \
/usr/local/bin/azure-cns
COPY --from=builder /usr/local/bin/azure-vnet-telemetry \
/usr/local/bin/azure-vnet-telemetry
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
ENTRYPOINT [ "/usr/local/bin/azure-cns" ]
EXPOSE 10090

0 comments on commit 03f28b8

Please sign in to comment.