-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (29 loc) · 1016 Bytes
/
Dockerfile
File metadata and controls
41 lines (29 loc) · 1016 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
36
37
38
39
40
41
# ---- Stage 1: Download sops ----
FROM alpine:3.23 AS sops-downloader
ARG SOPS_VERSION=v3.11.0
WORKDIR /tmp
RUN apk add --no-cache curl \
&& curl -sSL -o sops https://github.com/getsops/sops/releases/download/${SOPS_VERSION}/sops-${SOPS_VERSION}.linux.amd64 \
&& chmod +x sops
# ---- Stage 2: Runtime ----
FROM eclipse-temurin:25-jre-alpine
LABEL org.opencontainers.image.source=https://github.com/SibeiC/api-server/
LABEL org.opencontainers.image.description="Sibei's API Server image"
LABEL org.opencontainers.image.licenses=GPL-3.0-only
# Set working directory
WORKDIR /app
# Copy sops binary from downloader stage
COPY --from=sops-downloader /tmp/sops /usr/local/bin/sops
# Copy built JAR from CI
COPY app/api-server.jar ./api-server.jar
# Copy relevant files
COPY entrypoint.sh .
COPY .env.enc .
# Make entrypoint executable
RUN chmod +x entrypoint.sh
# Expose ports
EXPOSE 8080 8957
# Mount point for data exchange
VOLUME ["/opt/api-server"]
# Start the app
ENTRYPOINT ["./entrypoint.sh"]