forked from reanahub/reana-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (36 loc) · 1.21 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
# This file is part of REANA.
# Copyright (C) 2017, 2018, 2019, 2020 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
# Install base image and its dependencies
FROM python:3.8-slim
# hadolint ignore=DL3008, DL3009, DL3015
RUN apt-get update && \
apt-get install -y \
gcc \
vim-tiny \
libffi-dev \
procps
# Install dependencies
COPY requirements.txt /code/
RUN pip install --no-cache-dir -r /code/requirements.txt
# Copy cluster component source code
WORKDIR /code
COPY . /code
# Are we debugging?
ARG DEBUG=0
RUN if [ "${DEBUG}" -gt 0 ]; then pip install -e ".[debug]"; else pip install .; fi;
# Are we building with locally-checked-out shared modules?
# hadolint ignore=SC2102
RUN if test -e modules/reana-commons; then pip install -e modules/reana-commons[kubernetes,yadage] --upgrade; fi
RUN if test -e modules/reana-db; then pip install -e modules/reana-db --upgrade; fi
# Check if there are broken requirements
RUN pip check
# Set useful environment variables
ENV TERM=xterm \
FLASK_APP=/code/reana_server/app.py
# Expose ports to clients
EXPOSE 5000
# Run server
CMD ["uwsgi --ini uwsgi.ini"]