Files
liveflow/Dockerfile
Han Gyoung-Su 49a0465523 Fix whep's memory leak (#17)
Adopt address sanitizer for ffmpeg
2025-03-17 02:35:41 +09:00

20 lines
670 B
Docker

FROM golang:1.23-bullseye
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y build-essential git pkg-config libunistring-dev libaom-dev libdav1d-dev bzip2 nasm wget yasm ca-certificates
COPY install-ffmpeg.sh /install-ffmpeg.sh
RUN chmod +x /install-ffmpeg.sh && /install-ffmpeg.sh
ENV PKG_CONFIG_PATH=/ffmpeg_build/lib/pkgconfig:${PKG_CONFIG_PATH}
ENV PATH="/usr/local/go/bin:${PATH}"
WORKDIR /app
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
COPY ./ /app
RUN mkdir -p /app/bin/videos
RUN --mount=type=cache,target=/root/.cache/go-build \
go build -o /app
WORKDIR /app
ENV GOGC=10
ENTRYPOINT ["/app/liveflow"]