-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 741 Bytes
/
Dockerfile
File metadata and controls
32 lines (23 loc) · 741 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
# ---- Build stage ----
FROM golang:1.24-bookworm AS builder
WORKDIR /build
# Copy source and resolve dependencies
COPY . .
RUN go mod tidy && CGO_ENABLED=0 GOOS=linux go build -o arkapi ./cmd/arkapi
# ---- Runtime stage ----
FROM debian:bookworm-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
dnsutils \
whois \
curl \
ca-certificates \
netbase && \
rm -rf /var/lib/apt/lists/*
# Run as non-root
RUN useradd -r -s /usr/sbin/nologin arkapi
RUN mkdir -p /data /usr/local/share/arkapi && chown arkapi:arkapi /data
COPY --from=builder /build/arkapi /usr/local/bin/arkapi
COPY openapi.json /usr/local/share/arkapi/openapi.json
USER arkapi
ENTRYPOINT ["arkapi"]