aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/docker/production/Dockerfile.stretch
diff options
context:
space:
mode:
Diffstat (limited to 'support/docker/production/Dockerfile.stretch')
-rw-r--r--support/docker/production/Dockerfile.stretch24
1 files changed, 15 insertions, 9 deletions
diff --git a/support/docker/production/Dockerfile.stretch b/support/docker/production/Dockerfile.stretch
index bf2bae510..5bb67f816 100644
--- a/support/docker/production/Dockerfile.stretch
+++ b/support/docker/production/Dockerfile.stretch
@@ -33,7 +33,13 @@ RUN set -ex; \
33 wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ 33 wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
34 wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ 34 wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
35 export GNUPGHOME="$(mktemp -d)"; \ 35 export GNUPGHOME="$(mktemp -d)"; \
36 gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \ 36 for server in $(shuf -e ha.pool.sks-keyservers.net \
37 hkp://p80.pool.sks-keyservers.net:80 \
38 keyserver.ubuntu.com \
39 hkp://keyserver.ubuntu.com:80 \
40 pgp.mit.edu) ; do \
41 gpg --keyserver "$server" --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && break || : ; \
42 done; \
37 gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ 43 gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
38 rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \ 44 rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
39 chmod +x /usr/local/bin/gosu; \ 45 chmod +x /usr/local/bin/gosu; \
@@ -41,13 +47,13 @@ RUN set -ex; \
41 \ 47 \
42 apt-get purge -y --auto-remove wget 48 apt-get purge -y --auto-remove wget
43 49
44# Download the latest version
45RUN git clone https://github.com/Chocobozzz/PeerTube /app \
46 && chown -R peertube:peertube /app
47
48# Install PeerTube 50# Install PeerTube
49USER peertube
50WORKDIR /app 51WORKDIR /app
52RUN chown peertube:peertube /app
53
54COPY --chown=peertube:peertube . ./
55
56USER peertube
51 57
52RUN yarn install --pure-lockfile \ 58RUN yarn install --pure-lockfile \
53 && npm run build 59 && npm run build
@@ -58,11 +64,11 @@ ENV NODE_ENV production
58ENV NODE_CONFIG_DIR /app/support/docker/production/config 64ENV NODE_CONFIG_DIR /app/support/docker/production/config
59 65
60USER root 66USER root
61RUN mkdir /data && chown peertube:peertube /data 67RUN mkdir /data
62VOLUME /data 68VOLUME /data
63 69
64COPY docker-entrypoint.sh /usr/local/bin/ 70COPY ./support/docker/production/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
65ENTRYPOINT ["docker-entrypoint.sh"] 71ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
66 72
67# Run the application 73# Run the application
68CMD ["npm", "start"] 74CMD ["npm", "start"]