Compile libsrt in Docker
This commit is contained in:
parent
c71d2fec1a
commit
1cba80d53e
10
Dockerfile
10
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"]
|
||||
CMD ["/app/ghostream"]
|
||||
|
|
Loading…
Reference in New Issue