forked from inveniosoftware/inveniosoftware.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 856 Bytes
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 856 Bytes
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
# Use Python-3.5:
FROM python:3.5
# Install Node.js:
RUN curl -sL https://deb.nodesource.com/setup_4.x | bash -
RUN apt-get -y install nodejs
# Install bower:
RUN npm update && \
npm install --silent -g bower
# Clean after ourselves:
RUN apt-get clean
# Install Python prerequisites:
ADD requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
# Add inveniosoftware.org sources to `code` and work there:
WORKDIR /code
ADD . /code
# Run container as user `invenio` with UID `1000`, which should match
# current host user in most situations:
RUN adduser --uid 1000 --disabled-password --gecos '' invenio && \
chown -R invenio:invenio /code
USER invenio
# Run bower:
RUN bower install
# Set environment variables:
ENV FLASK_APP=app.py
# Start the inveniosoftware.org application:
CMD ["flask", "run", "-h", "0.0.0.0"]