X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=support%2Fdocker%2Fdev%2FDockerfile;h=8e049f3f6a1390ba9214d646ddff35df044ce177;hb=88108880bbdba473cfe36ecbebc1c3c4f972e102;hp=2328140fbc171c550cce766ca031b1e1da42d24b;hpb=492fd28167f770d79a430fc57451b5a9e075d8e7;p=github%2FChocobozzz%2FPeerTube.git diff --git a/support/docker/dev/Dockerfile b/support/docker/dev/Dockerfile index 2328140fb..8e049f3f6 100644 --- a/support/docker/dev/Dockerfile +++ b/support/docker/dev/Dockerfile @@ -1,20 +1,46 @@ -FROM janx/ubuntu-dev -MAINTAINER Jan Keromnes +FROM ubuntu:bionic + +# Avoid tzdata interactive dialog +ENV DEBIAN_FRONTEND=noninteractive # Install PeerTube's dependencies. # Packages are from https://github.com/Chocobozzz/PeerTube#dependencies -RUN sudo apt-get update -q && sudo apt-get install -qy \ - ffmpeg \ - postgresql \ - openssl +RUN apt-get update -q && apt-get install -qy \ + curl \ + ffmpeg \ + g++ \ + git \ + gnupg \ + make \ + nano \ + openssl \ + postgresql \ + postgresql-contrib \ + redis-server \ + && curl -sL https://deb.nodesource.com/setup_8.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 install -qy nodejs yarn \ + && rm -rf /var/lib/apt/lists/* # Download PeerTube's source code. RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube WORKDIR /home/user/PeerTube -# Configure Cloud9 IDE to use PeerTube's source directory as workspace (-w). -RUN sudo sed -i "s/-w \/home\/user/-w \/home\/user\/PeerTube/" /etc/supervisord.conf +# Copy postgresql setup script +COPY setup_postgres.sql /tmp/ + +# Install Node.js dependencies and setup PostgreSQL +RUN yarn install --pure-lockfile \ + && service postgresql start \ + && su postgres -c "psql --file=/tmp/setup_postgres.sql" + +# Expose PeerTube sources as a volume +VOLUME /home/user/PeerTube + +# Expose API and frontend +EXPOSE 3000 9000 -# Configure and build PeerTube. -RUN yarn install \ - && npm run build +# Start PostgreSQL and Redis +CMD ["service postgresql start && redis-server"]