Skip to content

Commit 32c03d8

Browse files
committed
adds Dockerfile
1 parent a087b52 commit 32c03d8

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM ubuntu:18.04
2+
3+
LABEL maintainer="Specify Collections Consortium <github.com/specify>"
4+
5+
RUN apt-get update && apt-get -y install --no-install-recommends \
6+
ghostscript \
7+
imagemagick \
8+
python3.6 \
9+
python3-venv \
10+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
11+
12+
RUN groupadd -g 999 specify && \
13+
useradd -r -u 999 -g specify specify
14+
15+
RUN mkdir -p /home/specify && chown specify.specify /home/specify
16+
17+
USER specify
18+
WORKDIR /home/specify
19+
20+
COPY --chown=specify:specify requirements.txt .
21+
22+
RUN python3.6 -m venv ve && ve/bin/pip install --no-cache-dir -r requirements.txt
23+
24+
COPY --chown=specify:specify *.py views ./
25+
26+
RUN mkdir -p /home/specify/attachments/
27+
28+
RUN echo \
29+
"import os" \
30+
"\nSERVER = 'paste'" \
31+
"\nSERVER_NAME = os.environ['SERVER_NAME']" \
32+
"\nSERVER_PORT = int(os.getenv('SERVER_PORT', 8080))" \
33+
"\nKEY = os.environ['ATTACHMENT_KEY']" \
34+
"\nDEBUG = os.getenv('DEBUG_MODE', 'false').lower() == 'true'" \
35+
>> settings.py
36+
37+
EXPOSE 8080
38+
CMD ve/bin/python server.py

0 commit comments

Comments
 (0)