Use deterministic UID/GID (1000:1000) to execute the deeplx binary

This commit is contained in:
Chao Tzu-Hsien 2026-05-24 00:39:25 +08:00
parent a987c82641
commit 3aa23e1c4f
No known key found for this signature in database

View File

@ -6,8 +6,8 @@ RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o deeplx .
FROM alpine:latest FROM alpine:latest
WORKDIR /app WORKDIR /app
RUN addgroup -S deeplx && adduser -h /app -G deeplx -SH deeplx RUN addgroup -g 1000 -S deeplx && adduser -h /app -G deeplx -SH -u 1000 deeplx
USER deeplx USER 1000:1000
COPY --from=builder --chown=deeplx /go/src/github.com/OwO-Network/DeepLX/deeplx /app/deeplx COPY --from=builder --chown=deeplx /go/src/github.com/OwO-Network/DeepLX/deeplx /app/deeplx
EXPOSE 1188 EXPOSE 1188
ENTRYPOINT ["/app/deeplx"] ENTRYPOINT ["/app/deeplx"]