- Switch Dockerfile base image from golang:1.23-bookworm to debian:12-slim - Update Dockerfile to use pre-built binary instead of building in container - Fix Docker CMD to use new CLI flag format with --listen and --root-path - Update Makefile to build binary to ./dist/ directory with CGO_ENABLED=0 - Make build-docker target depend on build target for efficiency - Change clean target to remove ./dist directory instead of single binary
17 lines
304 B
Docker
17 lines
304 B
Docker
FROM debian:12-slim
|
|
|
|
RUN apt-get update && apt-get upgrade -y
|
|
|
|
RUN useradd -u 1000 -m user
|
|
|
|
COPY ./gemserve /app/gemserve
|
|
|
|
WORKDIR /app
|
|
|
|
RUN chmod +x /app/gemserve && \
|
|
chown -R root:root /app && \
|
|
chmod -R 755 /app
|
|
|
|
USER user
|
|
CMD ["/app/gemserve","--listen","0.0.0.0:1965","--root-path","/srv"]
|