summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 33baceac3df46e3e36d3be2575faf4ea2b08692e (plain) (blame)
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
FROM alpine:3.17 as dep

LABEL org.opencontainers.image.source=https://github.com/neonxp/base
LABEL org.opencontainers.image.description="NeonXP Base image"
LABEL org.opencontainers.image.licenses=MIT
LABEL org.opencontainers.image.authors="Alexander Kiryukhin <i@neonxp.dev>"

ENV USER=docker
ENV UID=10001 

RUN adduser \    
    --disabled-password \    
    --gecos "" \    
    --home "/nonexistent" \    
    --shell "/sbin/nologin" \    
    --no-create-home \    
    --uid "${UID}" \    
    "${USER}" && \
    apk update && apk add --no-cache ca-certificates tzdata && update-ca-certificates

FROM scratch

COPY --from=dep /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=dep /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=dep /etc/passwd /etc/passwd
COPY --from=dep /etc/group /etc/group

ENV TZ=Europe/Moscow
USER docker:docker

WORKDIR /app