watch me smash my head on the keyboard
This commit is contained in:
parent
9ee1291d43
commit
eb6addd034
1 changed files with 6 additions and 2 deletions
|
|
@ -13,13 +13,17 @@ RUN go mod tidy && go build -o codex-server
|
||||||
# create a smaller final image
|
# create a smaller final image
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
WORKDIR /root/
|
WORKDIR /app
|
||||||
|
|
||||||
# copy the built binary from the builder stage
|
# copy the built binary from the builder stage
|
||||||
COPY --from=builder /app/codex-server .
|
COPY --from=builder /app/codex-server .
|
||||||
|
|
||||||
|
# set a non-root user for security
|
||||||
|
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
||||||
|
USER appuser
|
||||||
|
|
||||||
# expose the port (match your go server's listening port)
|
# expose the port (match your go server's listening port)
|
||||||
EXPOSE 61594
|
EXPOSE 61594
|
||||||
|
|
||||||
# run the go server
|
# run the go server
|
||||||
CMD ["./codex-server"]
|
ENTRYPOINT ["./codex-server"]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue