dockerfile
This commit is contained in:
parent
5651b89a6b
commit
d4d0dc01ea
10
Dockerfile
10
Dockerfile
|
|
@ -20,9 +20,7 @@ RUN go mod download
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build with Go build cache (requires BuildKit)
|
# Build with Go build cache (requires BuildKit)
|
||||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
RUN ${BUILD_COMMAND}
|
||||||
--mount=type=cache,target=/root/.cache/go-build \
|
|
||||||
${BUILD_COMMAND}
|
|
||||||
|
|
||||||
# ---- Runner Stage ----
|
# ---- Runner Stage ----
|
||||||
FROM debian:bookworm-slim AS runner
|
FROM debian:bookworm-slim AS runner
|
||||||
|
|
@ -30,7 +28,7 @@ FROM debian:bookworm-slim AS runner
|
||||||
# Install minimal runtime dependencies (e.g. for TLS, CA certs)
|
# Install minimal runtime dependencies (e.g. for TLS, CA certs)
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Build Args
|
# Build Args
|
||||||
|
|
@ -44,6 +42,8 @@ COPY --from=builder /build/${BINARY_NAME} ./app
|
||||||
COPY config.yaml .
|
COPY config.yaml .
|
||||||
COPY db.yaml .
|
COPY db.yaml .
|
||||||
COPY ui.html .
|
COPY ui.html .
|
||||||
|
COPY ui_dbedit.html .
|
||||||
|
COPY ui_admin_chats.html .
|
||||||
|
EXPOSE 8080
|
||||||
# Run binary directly
|
# Run binary directly
|
||||||
ENTRYPOINT ["./app"]
|
ENTRYPOINT ["./app"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue