mirror of
https://github.com/OwO-Network/DeepLX.git
synced 2026-06-11 15:28:50 +00:00
feat(docker): non-root user + ENTRYPOINT (#222)
Closes #221. - Run as non-root using an Alpine system account (UID auto-assigned from the 100-999 system range, referenced by name to avoid hard-coding). - Replace CMD with ENTRYPOINT so args passed to `docker run` flow through to the deeplx binary. - EXPOSE 1188 for documentation.
This commit is contained in:
parent
432c0a223c
commit
1b88e428ae
@ -6,5 +6,8 @@ RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o deeplx .
|
||||
|
||||
FROM alpine:latest
|
||||
WORKDIR /app
|
||||
COPY --from=builder /go/src/github.com/OwO-Network/DeepLX/deeplx /app/deeplx
|
||||
CMD ["/app/deeplx"]
|
||||
RUN addgroup -S deeplx && adduser -h /app -G deeplx -SH deeplx
|
||||
USER deeplx:deeplx
|
||||
COPY --from=builder --chown=deeplx:deeplx /go/src/github.com/OwO-Network/DeepLX/deeplx /app/deeplx
|
||||
EXPOSE 1188
|
||||
ENTRYPOINT ["/app/deeplx"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user