forked from skupperproject/skupper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.network-observer
38 lines (28 loc) · 1.05 KB
/
Dockerfile.network-observer
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
37
38
FROM --platform=$BUILDPLATFORM golang:1.22 AS builder
ARG TARGETARCH
WORKDIR /go/src/app
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
ENV CGO_ENABLED=0
RUN make GOARCH=$TARGETARCH build-network-observer
FROM --platform=$BUILDPLATFORM node:20.9.0 AS console-builder
WORKDIR /skupper-console/
ADD https://github.com/skupperproject/skupper-console/archive/main.tar.gz .
RUN tar -zxf main.tar.gz
WORKDIR ./skupper-console-main
RUN yarn install && yarn build
FROM --platform=$TARGETPLATFORM registry.access.redhat.com/ubi9-minimal
LABEL \
org.opencontainers.image.title="Skupper Network Observer" \
org.opencontainers.image.description="Exposes Skupper network telemetry thorugh an API, metrics and a web console"
# Create user and group and switch to user's context
RUN microdnf -y install shadow-utils \
&& microdnf clean all
RUN useradd --uid 10000 runner
USER 10000
WORKDIR /app
COPY --from=builder /go/src/app/network-observer .
COPY --from=console-builder /skupper-console/skupper-console-main/build/ console
ENTRYPOINT ["/app/network-observer"]