-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (21 loc) · 714 Bytes
/
Dockerfile
File metadata and controls
27 lines (21 loc) · 714 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
# syntax=docker/dockerfile:1
# ============================================================================
# Shared base image
FROM scratch AS base
COPY --from=docker.io/alpine:3.23.0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY <<EOF /etc/passwd
nobody:x:65534:65534:nobody:/nonexistent:/bin/false
EOF
COPY <<EOF /etc/group
nobody:x:65534:
EOF
USER nobody:nobody
# ============================================================================
# Runtime Image
# ============================================================================
FROM base
ARG APP
ARG TARGETOS
ARG TARGETARCH
COPY --chown=nobody:nobody ${TARGETOS}_${TARGETARCH}/$APP /bin/app
ENTRYPOINT [ "/bin/app" ]