diff options
Diffstat (limited to 'support/docker')
-rw-r--r-- | support/docker/dev/Dockerfile | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/support/docker/dev/Dockerfile b/support/docker/dev/Dockerfile index aa4a8a3d6..8e049f3f6 100644 --- a/support/docker/dev/Dockerfile +++ b/support/docker/dev/Dockerfile | |||
@@ -6,43 +6,41 @@ ENV DEBIAN_FRONTEND=noninteractive | |||
6 | # Install PeerTube's dependencies. | 6 | # Install PeerTube's dependencies. |
7 | # Packages are from https://github.com/Chocobozzz/PeerTube#dependencies | 7 | # Packages are from https://github.com/Chocobozzz/PeerTube#dependencies |
8 | RUN apt-get update -q && apt-get install -qy \ | 8 | RUN apt-get update -q && apt-get install -qy \ |
9 | curl \ | 9 | curl \ |
10 | nano \ | 10 | ffmpeg \ |
11 | ffmpeg \ | 11 | g++ \ |
12 | postgresql \ | 12 | git \ |
13 | postgresql-contrib \ | 13 | gnupg \ |
14 | openssl \ | 14 | make \ |
15 | g++ \ | 15 | nano \ |
16 | make \ | 16 | openssl \ |
17 | redis-server \ | 17 | postgresql \ |
18 | git \ | 18 | postgresql-contrib \ |
19 | gnupg | 19 | redis-server \ |
20 | 20 | && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ | |
21 | # Install NodeJS 8.x | 21 | && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ |
22 | RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ | 22 | && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ |
23 | apt-get install -y nodejs | 23 | && apt-get update \ |
24 | 24 | && apt-get install -qy nodejs yarn \ | |
25 | # Install Yarn | 25 | && rm -rf /var/lib/apt/lists/* |
26 | RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | ||
27 | echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ | ||
28 | apt-get update && apt-get install yarn | ||
29 | 26 | ||
30 | # Download PeerTube's source code. | 27 | # Download PeerTube's source code. |
31 | RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube | 28 | RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube |
32 | WORKDIR /home/user/PeerTube | 29 | WORKDIR /home/user/PeerTube |
33 | 30 | ||
34 | # Install dependencies. | 31 | # Copy postgresql setup script |
35 | RUN yarn install --pure-lockfile | ||
36 | |||
37 | # Configure and run PeerTube. | ||
38 | COPY setup_postgres.sql /tmp/ | 32 | COPY setup_postgres.sql /tmp/ |
39 | RUN service postgresql start \ | 33 | |
40 | && su postgres -c "psql --file=/tmp/setup_postgres.sql" | 34 | # Install Node.js dependencies and setup PostgreSQL |
35 | RUN yarn install --pure-lockfile \ | ||
36 | && service postgresql start \ | ||
37 | && su postgres -c "psql --file=/tmp/setup_postgres.sql" | ||
41 | 38 | ||
42 | # Expose PeerTube sources as a volume | 39 | # Expose PeerTube sources as a volume |
43 | VOLUME /home/user/PeerTube | 40 | VOLUME /home/user/PeerTube |
44 | 41 | ||
42 | # Expose API and frontend | ||
45 | EXPOSE 3000 9000 | 43 | EXPOSE 3000 9000 |
46 | 44 | ||
47 | # Start PostgreSQL and Redis | 45 | # Start PostgreSQL and Redis |
48 | CMD service postgresql start && redis-server | 46 | CMD ["service postgresql start && redis-server"] |