Compare commits

..

2 Commits

Author SHA1 Message Date
missuo
d15486a773
refactor(docker): use Alpine system UID range, reference user by name
Drop explicit -u 1000/-g 1000 and let busybox assign from Alpine's
system UID range (100-999), aligning with -S (system account)
semantics. Reference the account by name in USER and --chown to
avoid hard-coding a numeric UID that could collide with future
Alpine releases or layered packages.
2026-05-24 01:29:43 +08:00
Chao Tzu-Hsien
3aa23e1c4f
Use deterministic UID/GID (1000:1000) to execute the deeplx binary 2026-05-24 00:39:25 +08:00

View File

@ -7,7 +7,7 @@ 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 -S deeplx && adduser -h /app -G deeplx -SH deeplx
USER deeplx USER deeplx:deeplx
COPY --from=builder --chown=deeplx /go/src/github.com/OwO-Network/DeepLX/deeplx /app/deeplx COPY --from=builder --chown=deeplx:deeplx /go/src/github.com/OwO-Network/DeepLX/deeplx /app/deeplx
EXPOSE 1188 EXPOSE 1188
ENTRYPOINT ["/app/deeplx"] ENTRYPOINT ["/app/deeplx"]