forked from FNNDSC/pfcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·51 lines (46 loc) · 1.56 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
46
47
48
49
50
51
#
# Docker file for pfcon image
#
# Build production image:
#
# docker build -t <name> .
#
# For example if building a local production image:
#
# docker build -t local/pfcon .
#
# Build development image:
#
# docker build --build-arg ENVIRONMENT=local -t <name>:<tag> .
#
# For example if building a local development image:
#
# docker build --build-arg ENVIRONMENT=local -t local/pfcon:dev .
#
# In the case of a proxy (located at say proxy.tch.harvard.edu:3128), do:
#
# export PROXY="http://proxy.tch.harvard.edu:3128"
#
# then add to any of the previous build commands:
#
# --build-arg http_proxy=${PROXY}
#
# For example if building a local development image:
#
# docker build --build-arg http_proxy=${PROXY} --build-arg ENVIRONMENT=local -t local/pfcon:dev .
#
FROM docker.io/library/python:3.8.12-bullseye
LABEL org.opencontainers.image.authors="FNNDSC <[email protected]>" \
org.opencontainers.image.title="pfcon" \
org.opencontainers.image.description="ChRIS compute resource controller" \
org.opencontainers.image.url="https://chrisproject.org/" \
org.opencontainers.image.source="https://github.com/FNNDSC/pfcon" \
org.opencontainers.image.licenses="MIT"
WORKDIR /usr/local/src/pfcon
COPY ./requirements ./requirements
ARG ENVIRONMENT=production
RUN pip install --no-cache-dir -r /usr/local/src/pfcon/requirements/$ENVIRONMENT.txt
COPY . .
RUN if [ "$ENVIRONMENT" = "local" ]; then pip install -e .; else pip install .; fi
EXPOSE 5005
CMD ["gunicorn", "--bind", "0.0.0.0:5005", "--workers", "8", "--timeout", "3600", "pfcon.wsgi:application"]