diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/docker/production/Dockerfile.stretch | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/support/docker/production/Dockerfile.stretch b/support/docker/production/Dockerfile.stretch index b6de4bd9b..720f266d3 100644 --- a/support/docker/production/Dockerfile.stretch +++ b/support/docker/production/Dockerfile.stretch | |||
@@ -1,36 +1,20 @@ | |||
1 | FROM node:10-stretch | 1 | FROM node:10-stretch-slim |
2 | 2 | ||
3 | # Allow to pass extra options to the npm run build | 3 | # Allow to pass extra options to the npm run build |
4 | # eg: --light --light-fr to not build all client languages | 4 | # eg: --light --light-fr to not build all client languages |
5 | # (speed up build time if i18n is not required) | 5 | # (speed up build time if i18n is not required) |
6 | ARG NPM_RUN_BUILD_OPTS | 6 | ARG NPM_RUN_BUILD_OPTS |
7 | 7 | ||
8 | RUN set -ex; \ | ||
9 | if ! command -v gpg > /dev/null; then \ | ||
10 | apt update; \ | ||
11 | apt install -y --no-install-recommends \ | ||
12 | gnupg \ | ||
13 | dirmngr \ | ||
14 | ; \ | ||
15 | rm -rf /var/lib/apt/lists/*; \ | ||
16 | fi | ||
17 | |||
18 | # Install dependencies | 8 | # Install dependencies |
19 | RUN apt update \ | 9 | RUN apt update \ |
20 | && apt -y install ffmpeg \ | 10 | && apt install -y --no-install-recommends ffmpeg gnupg gosu \ |
21 | && rm /var/lib/apt/lists/* -fR | 11 | && gosu nobody true \ |
12 | && rm /var/lib/apt/lists/* -fR | ||
22 | 13 | ||
23 | # Add peertube user | 14 | # Add peertube user |
24 | RUN groupadd -r peertube \ | 15 | RUN groupadd -r peertube \ |
25 | && useradd -r -g peertube -m peertube | 16 | && useradd -r -g peertube -m peertube |
26 | 17 | ||
27 | # grab gosu for easy step-down from root | ||
28 | RUN set -eux; \ | ||
29 | apt update; \ | ||
30 | apt install -y gosu; \ | ||
31 | rm -rf /var/lib/apt/lists/*; \ | ||
32 | gosu nobody true | ||
33 | |||
34 | # Install PeerTube | 18 | # Install PeerTube |
35 | WORKDIR /app | 19 | WORKDIR /app |
36 | COPY . ./ | 20 | COPY . ./ |