forked from ga4gh-beacon/beacon-ui-elixir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (40 loc) · 1.08 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
FROM node:5
ARG UI_BUILD_ENV=docker
ARG UI_BUILD_APP=beacon
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install \
apt-utils \
apache2 \
git
ENV APACHE_LOCK_DIR=/var/lock
ENV APACHE_PID_FILE=/var/run/apache.pid
ENV APACHE_RUN_USER=www-data
ENV APACHE_RUN_GROUP=www-data
ENV APACHE_LOG_DIR=/var/log/apache2
RUN mkdir -p /opt/app
WORKDIR /opt/app
COPY src ./src
COPY scripts ./scripts
COPY package.json .
RUN npm install
WORKDIR /opt/app/src/js
RUN npm install
WORKDIR /opt/app
RUN node scripts/gulpbatch.js --env=docker --app=beacon
RUN npm uninstall
COPY conf/apache2/beacon_docker.conf ./beacon_docker.conf
RUN sed -e "s/__UI_BUILD_APP__/beacon/g" ./beacon_docker.conf |\
sed -e "s/__UI_BUILD_ENV__/docker/g" > \
/etc/apache2/sites-available/beacon_docker.conf
RUN a2ensite beacon_docker && \
a2dissite 000-default
RUN rm -Rf beacon_docker.conf \
src \
scripts \
node_modules \
package.json
RUN apt-get -y remove git apt-utils && \
apt-get -y clean && \
apt-get -y autoremove
CMD ["apache2", "-D", "FOREGROUND"]