forked from e-mission/e-mission-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev.server-only
40 lines (28 loc) · 991 Bytes
/
Dockerfile.dev.server-only
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
# python 3
FROM ubuntu:latest
MAINTAINER K. Shankari (shankari@eecs.berkeley.edu)
WORKDIR /usr/src/app
RUN apt-get update
RUN apt-get install -y curl
RUN apt-get install -y git
# install nano and vim for editing
RUN apt-get -y install nano vim
# cleanup
RUN apt-get -y remove --purge build-essential
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV SERVER_REPO=${SERVER_REPO:-https://github.com/e-mission/e-mission-server.git}
ENV SERVER_BRANCH=${SERVER_BRANCH:-master}
ADD clone_server.sh /clone_server.sh
RUN chmod u+x /clone_server.sh
ADD index.html /index.html
#declare environment variables
ENV DB_HOST=''
ENV WEB_SERVER_HOST=''
ENV LIVERELOAD_SRC=''
ADD start_script.sh /start_script.sh
RUN chmod u+x /start_script.sh
EXPOSE 8080
# This clone puts the server code into the container, not the image
# so the image is essentially a shell into which you can put the
# code from any branch
CMD ["/bin/bash", "-c", "/clone_server.sh && /start_script.sh"]