Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
compressor Dockerfile
906 B · 38 lines
Dockerfile
at master
1234567891011121314151617181920212223242526272829303132333435363738# Build stageFROM golang:1.26 AS builder
WORKDIR /app
# Copy go modCOPY go.mod go.sum ./RUN go mod download
# Copy sourceCOPY . .
# BuildRUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o compressor ./cmd/compressor
# Runtime stage with CUDA supportFROM nvidia/cuda:13.2.1-runtime-ubuntu22.04
# Install ffmpeg and ca-certificatesRUN apt-get update && apt-get install -y ffmpeg ca-certificates && rm -rf /var/lib/apt/lists/*
# Create app userRUN groupadd -r appgroup && useradd -r -g appgroup appuser
# Copy binaryCOPY --from=builder /app/compressor /usr/local/bin/compressor
# Create directoriesRUN mkdir -p /input /output && chown -R appuser:appgroup /input /output
USER appuser
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD curl -f http://localhost:8080/status || exit 1
# Default commandCMD ["/usr/local/bin/compressor"]