From 1cba80d53e7f43f7ff516f629a214e6ede8ea236 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 27 Sep 2020 20:25:42 +0200 Subject: [PATCH] Compile libsrt in Docker --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7ac56d6..d2b1148 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ -# Install dependencies and build +# Install dependencies, build libsrt then build ghostream FROM golang:1.15-alpine AS build_base -RUN apk add --no-cache git +RUN apk add --no-cache git build-base tcl pkgconfig cmake libressl-dev linux-headers +RUN git clone --depth 1 --branch v1.4.2 https://github.com/Haivision/srt && \ + cd srt && ./configure --enable-apps=OFF && make install && cd .. && rm -rf srt WORKDIR /code COPY . . RUN go mod download @@ -10,5 +12,7 @@ RUN go build -o ./out/ghostream . FROM alpine:3.12 RUN apk add ca-certificates COPY --from=build_base /code/out/ghostream /app/ghostream +COPY --from=build_base /code/web/static /app/web/static +COPY --from=build_base /code/web/template /app/web/template EXPOSE 8080 -CMD ["/app/ghostream"] \ No newline at end of file +CMD ["/app/ghostream"]