mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-22 11:22:49 -05:00
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
23 lines
566 B
Docker
23 lines
566 B
Docker
FROM golang:1.26-alpine@sha256:2389ebfa5b7f43eeafbd6be0c3700cc46690ef842ad962f6c5bd6be49ed82039 AS builder
|
|
|
|
WORKDIR /app
|
|
COPY ./ .
|
|
|
|
ARG TARGETARCH
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -ldflags="-s -w" -o onyx-cli .
|
|
RUN mkdir -p /home/onyx/.config
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY --from=builder --chown=65534:65534 /home/onyx /home/onyx
|
|
|
|
COPY --from=builder /app/onyx-cli /onyx-cli
|
|
|
|
ENV HOME=/home/onyx
|
|
ENV XDG_CONFIG_HOME=/home/onyx/.config
|
|
|
|
USER 65534:65534
|
|
|
|
ENTRYPOINT ["/onyx-cli"]
|