-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
32 lines (25 loc) · 886 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
FROM fluxrm/flux-sched:jammy
# docker build -t ghcr.io/flux-framework/flux-restful-api .
# This must be set to work (username / token set won't trigger it alone)
ARG use_auth
LABEL maintainer="Vanessasaurus <@vsoch>"
ENV FLUX_USER=${user:-fluxuser}
ENV FLUX_TOKEN=${token:-12345}
ENV FLUX_REQUIRE_AUTH=${use_auth}
ENV PORT=${port:-5000}
ENV HOST=${host:-0.0.0.0}
ENV WORKERS=${workers:-1}
USER root
RUN apt-get update && apt-get install -y python3-pip
COPY ./requirements.txt /requirements.txt
EXPOSE ${port}
ENV PYTHONPATH=/usr/lib/flux/python3.8:/code
# For easier Python development, and install time for timed commands
RUN pip install -r /requirements.txt && \
apt-get update && apt-get install -y time && \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /code
COPY . /code
ENTRYPOINT ["/code/entrypoint.sh"]