Files
crawler/Dockerfile
primal 8a9001c02c Restore working codebase with all methods
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:08:53 -05:00

38 lines
741 B
Docker

FROM golang:latest AS builder
WORKDIR /app
# Install build dependencies
RUN apt-get update && apt-get install -y gcc && rm -rf /var/lib/apt/lists/*
# Copy go mod files first for layer caching
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY *.go ./
COPY static/ ./static/
# Build the binary
RUN CGO_ENABLED=1 go build -o 1440.news .
# Runtime stage
FROM ubuntu:latest
WORKDIR /app
# Install runtime dependencies
RUN apt-get update && apt-get install -y ca-certificates tzdata && rm -rf /var/lib/apt/lists/*
# Copy binary from builder
COPY --from=builder /app/1440.news .
COPY --from=builder /app/static ./static
# Create feeds directory
RUN mkdir -p feeds
# Expose dashboard port
EXPOSE 4321
CMD ["./1440.news"]