|
@@ -1,22 +1,39 @@
|
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 : breakcache0
|
|
33
|
+RUN git clone https://github.com/qrkourier/audiogram.git
|
19
|
34
|
WORKDIR /home/audiogram/audiogram
|
|
35
|
+#VOLUME /home/audiogram/audiogram
|
20
|
36
|
|
21
|
37
|
# Install dependencies
|
22
|
38
|
RUN npm install
|
|
39
|
+CMD npm start
|