-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathDockerfile
42 lines (31 loc) · 841 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM golang:1.14-alpine AS build
LABEL maintainer="[email protected]"
# Set timezone
ENV TZ "Asia/Tokyo"
# Install tools required to build the project
RUN apk add --no-cache ca-certificates \
curl \
ffmpeg \
git \
make \
rtmpdump \
tzdata
ARG PROJECT_PATH=/go/src/github.com/yyoshiki41/radigo
WORKDIR ${PROJECT_PATH}
COPY . ${PROJECT_PATH}/
# Install deps
RUN make installdeps
# Build the project binary
RUN make build-4-docker
# This results in a single layer image
FROM alpine:latest
# Set timezone
ENV TZ "Asia/Tokyo"
# Set default output dir
VOLUME ["/output"]
RUN apk add --no-cache ca-certificates ffmpeg rtmpdump tzdata
COPY --from=build /usr/bin/ffmpeg /usr/bin/ffmpeg
COPY --from=build /usr/bin/rtmpdump /usr/bin/rtmpdump
COPY --from=build /bin/radigo /bin/radigo
ENTRYPOINT ["/bin/radigo"]
CMD ["--help"]