Update image

This commit is contained in:
Dryusdan 2019-11-16 10:33:15 +01:00
parent ec47aff065
commit a2ec3bbcb7
1 changed files with 19 additions and 15 deletions

View File

@ -1,6 +1,6 @@
FROM debian:jessie-slim
FROM debian:bullseye-slim
ARG PEERTUBE_VER=develop
ARG PEERTUBE_VER=v2.0.0
ENV UID=991 GID=991 \
HTTPS=false \
@ -26,16 +26,13 @@ ENV UID=991 GID=991 \
DEBIAN_FRONTEND=noninteractive
RUN groupadd -g 991 peertube && useradd -u 991 -g 991 --create-home peertube \
&& echo "deb http://ftp.debian.org/debian jessie-backports main contrib non-free" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get -y install curl \
&& apt-get -y --no-install-recommends install ffmpeg openssl git build-essential nginx-light \
&& apt-get clean \
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& 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 - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get -y install -y nodejs yarn --no-install-recommends \
&& apt-get -y --no-install-recommends install nodejs yarn curl gosu gnupg dirmngr ffmpeg openssl git build-essential nginx-light \
&& apt-get clean \
&& echo "****** Clone Peertube ******" \
&& git clone --branch ${PEERTUBE_VER} https://github.com/Chocobozzz/PeerTube /PeerTube \
&& echo "****** chown ******" \
@ -53,16 +50,23 @@ RUN groupadd -g 991 peertube && useradd -u 991 -g 991 --create-home peertube \
&& rm -rf /PeerTube/.git \
&& rm -rf /tmp/* /var/lib/apt/lists/* /var/cache/debconf/*-old \
&& rm -rf /usr/share/man/?? \
&& rm -rf /usr/share/man/??_*
&& rm -rf /usr/share/man/??_* \
&& mkdir -p /{data,config} \
&& chown -R peertube:peertube /data /config
EXPOSE 8080
WORKDIR /PeerTube/
ENV NODE_ENV production
ENV NODE_CONFIG_DIR /config
VOLUME ["/data", "/config"]
VOLUME /config
EXPOSE 9000
COPY rootfs /
RUN chmod +x /usr/local/bin/startup
WORKDIR /PeerTube/
VOLUME ["/PeerTube/certs", "/PeerTube/videos", "/PeerTube/logs", "/PeerTube/previews", "/PeerTube/thumbnails", "/PeerTube/torrents"]
ENTRYPOINT ["/usr/local/bin/startup"]
CMD ["npm", "start"]