Explorar el Código

import Dockerfile from qrkourier fork

Ken Bingham hace 6 años
padre
commit
d2f3ec581d
Se han modificado 1 ficheros con 24 adiciones y 8 borrados
  1. 24 8
      Dockerfile

+ 24 - 8
Dockerfile Ver fichero

@@ -1,22 +1,38 @@
1 1
 FROM ubuntu:16.04
2 2
 
3 3
 # Install dependencies
4
-RUN apt-get update --yes && apt-get upgrade --yes
5
-RUN apt-get install git nodejs npm \
6
-libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev libpng-dev build-essential g++ \
7
-ffmpeg \
8
-redis-server --yes
4
+RUN apt-get --yes update && \
5
+    apt-get --yes upgrade
6
+RUN apt-get --yes install git \
7
+                          nodejs \
8
+                          npm \
9
+                          libcairo2-dev \
10
+                          libjpeg8-dev \
11
+                          libpango1.0-dev \
12
+                          libgif-dev \
13
+                          libpng-dev \
14
+                          build-essential \
15
+                          g++ \
16
+                          ffmpeg \
17
+                          redis-server
9 18
 
10
-RUN ln -s `which nodejs` /usr/bin/node
19
+RUN update-alternatives --install /usr/bin/node node $(which nodejs) 50
11 20
 
12 21
 # Non-privileged user
13
-RUN useradd -m audiogram
22
+ARG UID=1000
23
+RUN useradd --create-home \
24
+            --no-log-init \
25
+            --shell /bin/false \
26
+            --uid $UID \
27
+            audiogram
14 28
 USER audiogram
15 29
 WORKDIR /home/audiogram
16 30
 
17 31
 # Clone repo
18
-RUN git clone https://github.com/nypublicradio/audiogram.git
32
+RUN git clone https://github.com/brizandrew/audiogram.git
19 33
 WORKDIR /home/audiogram/audiogram
34
+VOLUME /home/audiogram/audiogram
20 35
 
21 36
 # Install dependencies
22 37
 RUN npm install
38
+CMD npm start