aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/docker/production/Dockerfile.stretch
diff options
context:
space:
mode:
authorAngristan <Angristan@users.noreply.github.com>2018-03-23 14:33:51 +0100
committerChocobozzz <me@florianbigard.com>2018-03-23 14:33:51 +0100
commitc7574e8661d62982516ac21c661964b49adbc850 (patch)
treeb87d845f100c46f93010fe236a5a5906383724d8 /support/docker/production/Dockerfile.stretch
parent0bd78bf30b2ae159791bdc90d17ed18e0327f621 (diff)
downloadPeerTube-c7574e8661d62982516ac21c661964b49adbc850.tar.gz
PeerTube-c7574e8661d62982516ac21c661964b49adbc850.tar.zst
PeerTube-c7574e8661d62982516ac21c661964b49adbc850.zip
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
Diffstat (limited to 'support/docker/production/Dockerfile.stretch')
-rw-r--r--support/docker/production/Dockerfile.stretch22
1 files changed, 14 insertions, 8 deletions
diff --git a/support/docker/production/Dockerfile.stretch b/support/docker/production/Dockerfile.stretch
index c616194e6..b1905b3a8 100644
--- a/support/docker/production/Dockerfile.stretch
+++ b/support/docker/production/Dockerfile.stretch
@@ -2,19 +2,25 @@ FROM node:8-stretch
2 2
3# Install dependencies 3# Install dependencies
4RUN apt-get update \ 4RUN apt-get update \
5 && apt-get -y install ffmpeg \ 5 && apt-get -y install ffmpeg \
6 && rm /var/lib/apt/lists/* -fR 6 && rm /var/lib/apt/lists/* -fR
7 7
8RUN git clone -b master https://github.com/Chocobozzz/PeerTube /app 8# Add peertube user
9RUN groupadd -g 991 peertube \
10 && useradd -u 991 -g peertube -m peertube
9 11
10WORKDIR /app 12# Download the latest version
11RUN yarn install --pure-lockfile && npm run build 13RUN git clone https://github.com/Chocobozzz/PeerTube /app \
14 && chown -R peertube:peertube /app
12 15
13# Configure the application 16# Install PeerTube
14RUN groupadd -g 991 peertube \
15 && useradd -u 991 -g peertube -d /data -m peertube
16USER peertube 17USER peertube
18WORKDIR /app
19
20RUN yarn install --pure-lockfile \
21 && npm run build
17 22
23# Configure PeerTube
18RUN cp /app/config/default.yaml /app/support/docker/production/config/default.yaml 24RUN cp /app/config/default.yaml /app/support/docker/production/config/default.yaml
19ENV NODE_ENV production 25ENV NODE_ENV production
20ENV NODE_CONFIG_DIR /app/support/docker/production/config 26ENV NODE_CONFIG_DIR /app/support/docker/production/config