diff --git a/Dockerfile b/Dockerfile index 0a5a79b..d53886f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-slim +FROM debian:stretch-slim ARG PEERTUBE_VER=v2.0.0 ARG NPM_RUN_BUILD_OPTS @@ -11,6 +11,8 @@ ENV UID=991 \ RUN groupadd -g 991 peertube && useradd -u 991 -g 991 --create-home peertube \ + && apt-get update \ + && apt-get -y --no-install-recommends install curl gnupg ca-certificates \ && echo "deb http://ftp.debian.org/debian bullseye-backports main contrib non-free" >> /etc/apt/sources.list \ && curl -sL https://deb.nodesource.com/setup_10.x | bash - \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ @@ -23,6 +25,8 @@ RUN groupadd -g 991 peertube && useradd -u 991 -g 991 --create-home peertube \ && echo "****** chown ******" \ && chown -R peertube:peertube /app \ && cd /app \ + && echo "****** run yarn install as user ******" \ + && su - peertube -c "cd /app && yarn install --pure-lockfile" \ && echo "****** run npm install as user ******" \ && su - peertube -c "cd /app && npm run build -- $NPM_RUN_BUILD_OPTS && rm -r ./node_modules ./client/node_modules " \ && echo "****** run yarn install as user ******" \