mirror of
				https://gitlab.crans.org/nounous/ghostream.git
				synced 2025-11-04 07:42:10 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			739 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			739 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
# Install dependencies, build libsrt then build ghostream
 | 
						|
FROM golang:1.15-alpine AS build_base
 | 
						|
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 go.* ./
 | 
						|
RUN go mod download
 | 
						|
COPY . .
 | 
						|
RUN go build -ldflags '-extldflags "-static"' -o ./out/ghostream .
 | 
						|
 | 
						|
# Production image
 | 
						|
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"]
 |