-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
35 lines (25 loc) · 1013 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
33
34
35
# leverage the renci python base image
FROM renciorg/renci-python-image:v0.0.1
# make a directory for the repo
RUN mkdir /api-watchdog
# go to the directory where we are going to download the repo
WORKDIR /download
# get the "latest" code, this must update to the latest api-watchdog release
RUN wget https://github.com/ranking-agent/api-watchdog/archive/refs/tags/v0.4.4.zip -O api-watchdog.zip
RUN unzip -o api-watchdog.zip -d /api-watchdog
# this must also update to the latest api-watchdog release tag
WORKDIR /api-watchdog/api-watchdog-0.4.4
# make sure all is writeable for the nru USER later on
RUN chmod -R 777 .
# install requirements
RUN pip install -r requirements-lock.txt
RUN pip install .
# Make a folder to put the fetch and exec script
RUN mkdir /sandbox
WORKDIR /sandbox
COPY ./fetch-and-exec.sh /sandbox/fetch-and-exec.sh
# make sure all is writeable for the nru USER later on
RUN chmod -R 777 .
# switch to the non-root user (nru). defined in the base image
USER nru
WORKDIR /sandbox