Build server image / build (push) Failing after 2s
Remove embedded credentials and private deployment configuration; document the remaining publication checks.
18 lines
563 B
Docker
18 lines
563 B
Docker
FROM golang:1.24-bookworm AS build
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=1 go build -trimpath -ldflags="-s -w" -o /out/server ./cmd/server
|
|
|
|
FROM debian:bookworm-slim
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ca-certificates ffmpeg wget \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
RUN useradd --uid 1000 --create-home app
|
|
RUN mkdir -p /data /media && chown app:app /data
|
|
COPY --from=build /out/server /usr/local/bin/short-form-video-server
|
|
USER app
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["short-form-video-server"]
|