-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60cf4a6
commit 9e71ddf
Showing
1 changed file
with
21 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
FROM golang:latest | ||
################################# | ||
# RTMP Server Dockerfile # | ||
################################# | ||
|
||
WORKDIR /root | ||
# Builder | ||
FROM golang:latest as builder | ||
|
||
# Copy files | ||
## Copy files | ||
ADD . /root | ||
|
||
ADD . /root | ||
## Compile | ||
WORKDIR /root | ||
RUN go build -o rtmp-server | ||
|
||
# Fetch dependencies | ||
|
||
RUN go get github.com/AgustinSRG/rtmp-server | ||
# Runner | ||
FROM alpine as runner | ||
|
||
# Compile | ||
## Install common libraries | ||
RUN apk add gcompat | ||
|
||
RUN go build | ||
## Copy binary | ||
COPY --from=builder /root/rtmp-server /usr/bin/rtmp-server | ||
|
||
# Expose ports | ||
# Expose ports | ||
EXPOSE 1935 | ||
EXPOSE 443 | ||
|
||
EXPOSE 1935 | ||
EXPOSE 443 | ||
|
||
# Entry point | ||
|
||
ENTRYPOINT ["/root/rtmp-server"] | ||
# Entry point | ||
ENTRYPOINT ["/usr/bin/rtmp-server"] |