forked from cmer/docker-RTSPtoWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 748 Bytes
/
Dockerfile
File metadata and controls
33 lines (24 loc) · 748 Bytes
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
FROM golang:alpine
# Set necessary environmet variables needed for our image
ENV CGO_ENABLED=0 \
GOOS=linux \
GOARCH=amd64
# Move to working directory /build
WORKDIR /build
# Get Git
RUN apk add --no-cache git
# Copy and download dependency using go mod
RUN git clone https://github.com/deepch/RTSPtoWeb.git && cd RTSPtoWeb && go build
# Move to /dist directory as the place for resulting binary folder
WORKDIR /dist
COPY config/config.json /dist/
COPY start.sh /
# Copy binary from build to main folder
RUN cp /build/RTSPtoWeb/RTSPtoWeb .
RUN cp -r /build/RTSPtoWeb/web .
RUN chmod a+x /dist/RTSPtoWeb
# Export necessary port & volume
EXPOSE 8083
VOLUME /config
# Command to run when starting the container
ENTRYPOINT "/start.sh"