diff options
Diffstat (limited to 'support/docker/production/Dockerfile.alpine')
-rw-r--r-- | support/docker/production/Dockerfile.alpine | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/support/docker/production/Dockerfile.alpine b/support/docker/production/Dockerfile.alpine new file mode 100644 index 000000000..939b2d23b --- /dev/null +++ b/support/docker/production/Dockerfile.alpine | |||
@@ -0,0 +1,24 @@ | |||
1 | FROM node:8-alpine | ||
2 | |||
3 | # Install dependencies | ||
4 | RUN apk add --no-cache ffmpeg openssl bash make g++ git \ | ||
5 | && apk add --no-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ vips-dev fftw-dev | ||
6 | |||
7 | # Install the application | ||
8 | WORKDIR /app | ||
9 | |||
10 | COPY . ./ | ||
11 | RUN bash -c 'yarn install --pure-lockfile && npm run build' | ||
12 | |||
13 | # Configure the application | ||
14 | RUN addgroup -g 991 peertube \ | ||
15 | && adduser -D -u 991 -G peertube -h /data peertube | ||
16 | USER peertube | ||
17 | |||
18 | ENV NODE_ENV production | ||
19 | ENV NODE_CONFIG_DIR /app/support/docker/production/config/ | ||
20 | |||
21 | # Run the application | ||
22 | CMD ["npm", "start"] | ||
23 | VOLUME ["/data"] | ||
24 | EXPOSE 9000 | ||