Skip to content

Commit e3f632d

Browse files
tobiasgecimnine
authored andcommitted
Fixes #170 - "drf-yasg" installed into wrong dir
With the new multistage build the pip install command put some packages in the wrong directory. This resuled in them not being copied into the runtime images. This commit add the additional "--prefix" option to the install command. After that all test run and we no longer get the error "ModuleNotFoundError: No module named 'drf_yasg'".
1 parent 63174f8 commit e3f632d

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
@@ -16,7 +16,7 @@ RUN apk add --no-cache \
1616

1717
WORKDIR /install
1818

19-
RUN pip install --install-option="--prefix=/install" \
19+
RUN pip install --prefix="/install" --install-option="--prefix=/install" \
2020
# gunicorn is used for launching netbox
2121
gunicorn \
2222
greenlet \
@@ -30,7 +30,7 @@ RUN pip install --install-option="--prefix=/install" \
3030

3131
ARG NETBOX_PATH
3232
COPY ${NETBOX_PATH}/requirements.txt /
33-
RUN pip install --install-option="--prefix=/install" -r /requirements.txt
33+
RUN pip install --prefix="/install" --install-option="--prefix=/install" -r /requirements.txt
3434

3535
###
3636
# Main stage

0 commit comments

Comments
 (0)