1
0
Fork 0
peertube/support/docker/production/Dockerfile.alpine
Angristan c7574e8661 Run the installation as the peertube user inside the Docker image (#385)
* Run the installation as the peertube user

* Run the installation as the peertube user
2018-03-23 14:33:51 +01:00

30 lines
797 B
Text

FROM node:8-alpine
# Install dependencies
RUN apk add --no-cache ffmpeg openssl bash make g++ git \
&& apk add --no-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ vips-dev fftw-dev
# Add peertube user
RUN addgroup -g 991 peertube \
&& adduser -D -u 991 -G peertube peertube
# Download the latest version
RUN git clone https://github.com/Chocobozzz/PeerTube /app \
&& chown -R peertube:peertube /app
# Install PeerTube
USER peertube
WORKDIR /app
RUN yarn install --pure-lockfile \
&& npm run build
# Configure PeerTube
RUN cp /app/config/default.yaml /app/support/docker/production/config/default.yaml
ENV NODE_ENV production
ENV NODE_CONFIG_DIR /app/support/docker/production/config
# Run the application
CMD ["npm", "start"]
VOLUME ["/data"]
EXPOSE 9000