Skip to content

Commit 6c2741f

Browse files
Use requirements.txt to build dockerfile (#675)
This also pins the dependencies in their desired version as specified in the dockerfile and avoids build failures due to new versions of dependencies. Reference: #674 Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
1 parent e638d18 commit 6c2741f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ RUN mkdir -p /var/$APP_NAME/static/ \
7979
RUN mkdir -p /var/scancodeio/static/ \
8080
&& mkdir -p /var/scancodeio/workspace/
8181
# Install the dependencies before the codebase COPY for proper Docker layer caching
82-
COPY --chown=$APP_USER:$APP_USER setup.cfg setup.py $APP_DIR/
83-
RUN pip install --no-cache-dir .
82+
COPY --chown=$APP_USER:$APP_USER setup.cfg setup.py requirements.txt $APP_DIR/
83+
RUN pip install --requirement requirements.txt --no-cache-dir .
8484

8585
# Copy the codebase and set the proper permissions for the APP_USER
8686
COPY --chown=$APP_USER:$APP_USER . $APP_DIR

0 commit comments

Comments
 (0)