-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (28 loc) · 825 Bytes
/
Dockerfile
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 alpine:3.19.1 AS release
# Add nonroot user and group.
RUN addgroup -S nonroot \
&& adduser -S nonroot -G nonroot
# Set working directory for this stage.
WORKDIR /app
# Copy the compiled executable.
COPY articpad .
# Copy the .env file.
COPY config/.env.sample ./config/.env
# Copy templates.
COPY templates/ ./templates/
# Copy locales.
COPY locales/ ./locales/
# Copy the static files.
COPY ui/dist/ ./static/
# Add packages
RUN apk -U upgrade \
&& apk add --no-cache dumb-init curl ca-certificates tzdata
# Healthcheck
HEALTHCHECK --start-period=10s --interval=10s --timeout=5s \
CMD curl -f http://localhost:8080/health || exit 1
# Set the nonroot user as the default user.
USER nonroot
# Run application and expose port 8080.
EXPOSE 8080
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["./articpad"]