-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (22 loc) · 749 Bytes
/
Dockerfile
File metadata and controls
35 lines (22 loc) · 749 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
FROM stefanprodan/podinfo-base as builder
ARG VERSION=unknown
ARG GITCOMMIT=unknown
WORKDIR /podinfo
ADD https://github.com/stefanprodan/podinfo/archive/master.tar.gz .
RUN tar xzf master.tar.gz --strip 1
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w \
-X github.com/stefanprodan/podinfo/pkg/version.GITCOMMIT=${GITCOMMIT} \
-X github.com/stefanprodan/podinfo/pkg/version.VERSION=${VERSION}" \
-a -o bin/podinfo cmd/podinfo/*
FROM alpine:3.13
RUN addgroup -S app \
&& adduser -S -g app app \
&& apk --no-cache add \
curl openssl netcat-openbsd
WORKDIR /home/app
COPY --from=builder /podinfo/bin/podinfo .
COPY --from=builder /podinfo/ui ./ui
RUN chown -R app:app ./
USER app
RUN ./podinfo -v
CMD ["./podinfo"]