-
Notifications
You must be signed in to change notification settings - Fork 585
/
Dockerfile
45 lines (32 loc) · 844 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
43
44
# Build peerflix server
FROM node:14-alpine as build
RUN apk --no-cache add git && \
npm install -g grunt bower
WORKDIR /app
COPY package*.json ./
COPY app app
COPY server server
COPY bower.json .
COPY .bowerrc .
COPY Gruntfile.js .
COPY karma.conf.js .
RUN npm install
RUN bower --allow-root install
RUN grunt build
RUN npm prune --production
RUN mkdir release && \
cp -r /app/node_modules release/node_modules && \
cp -r /app/dist release/dist && \
cp -r /app/server release/server && \
cp -r package.json release/
# Create final image
FROM node:14-alpine
ENV PEERFLIX_CONFIG_PATH /app/config
RUN apk --no-cache add ffmpeg
WORKDIR /app
COPY --from=build /app/release ./
VOLUME /tmp/torrent-stream /app/config
USER node
EXPOSE 6881 9000
ENTRYPOINT ["/usr/local/bin/npm", "start"]
CMD ["--no-update-notifier"]