-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
40 lines (31 loc) · 1000 Bytes
/
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
FROM soedomoto/docker:ubuntu-lxde
LABEL maintainer="Grant Atkins <gatki001@odu.edu>"
# Change ubuntu mirror
RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|mirror://mirrors.ubuntu.com/mirrors.txt|g' /etc/apt/sources.list
RUN apt-get update -y
# Install python pip
RUN apt-get install -y python python-pip
RUN pip install --upgrade pip --no-cache-dir
# Install phantomjs
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y phantomjs
# Clean apt cache
RUN DEBIAN_FRONTEND=noninteractive apt-get clean
# Make temporary dir to put library file --> install it
RUN mkdir -p /tmp/app
COPY . /tmp/app
RUN pip install -U setuptools --no-cache-dir
RUN pip install /tmp/app --no-cache-dir
# Copy entrypoint to /server
RUN mkdir -p /app
COPY ./entrypoint.sh /app
RUN chmod +x -R /app/entrypoint.sh
#
ENV WORKSPACE /app/cache
RUN mkdir -p "$WORKSPACE"
WORKDIR "$WORKSPACE"
VOLUME "$WORKSPACE"
# Run entrypoint at startup
ENV PORT 80
EXPOSE $PORT
ENTRYPOINT ["/bin/sh", "-c"]
CMD ["/app/entrypoint.sh"]