forked from michzimny/learninglocker2-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (40 loc) · 1.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM debian:9
RUN apt-get update \
&& apt-get install -y \
wget \
procps \
curl \
git \
python \
build-essential \
xvfb \
apt-transport-https \
unzip \
gettext-base \
socat \
&& wget -qO- https://deb.nodesource.com/setup_6.x | bash \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g yarn
# install LL app
ENV LL_TAG=v2.3.3
RUN git clone https://github.com/LearningLocker/learninglocker.git /opt/learninglocker \
&& cd /opt/learninglocker \
&& git checkout $LL_TAG \
&& yarn install \
&& yarn build-all
WORKDIR /opt/learninglocker
# make a copy of the origin storage directory that will be used in entrypoint-common.sh
# to fill up a volume mounted here, if it's empty
RUN cp -r storage storage.template
# service api exposes port 8080
# service ui exposes port 3000
# see env.template
EXPOSE 3000 8080
COPY app/env.template .env.template
COPY app/entrypoint-common.sh entrypoint-common.sh
COPY app/entrypoint-ui.sh entrypoint-ui.sh
# safe value if missing
ENV API_HOST=api
ENV API_PORT=8080
ENTRYPOINT ["./entrypoint-common.sh"]