Skip to content

Commit

Permalink
fix: adds fixes in Dockerfile from Sonarlint
Browse files Browse the repository at this point in the history
Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
  • Loading branch information
jpower432 committed Dec 4, 2023
1 parent e9589db commit b0ee56e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use the UBI 8 minimal base image
# kics-scan disable=fd54f200-402c-4333-a5a4-36ef6709af2f
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest as python-base
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest AS python-base

ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
Expand All @@ -21,7 +21,7 @@ RUN microdnf update -y \
&& microdnf clean all \
&& rm -rf /var/lib/apt/lists/*

FROM python-base as dependencies
FROM python-base AS dependencies

ARG POETRY_VERSION=1.5.1

Expand All @@ -40,15 +40,15 @@ WORKDIR "/build"
COPY . "/build"

# Install runtime deps and install the project in non-editable mode.
RUN python3.9 -m venv $VENV_PATH && \
. $VENV_PATH/bin/activate && \
RUN python3.9 -m venv "$VENV_PATH" && \
. "$VENV_PATH"/bin/activate && \
poetry install --without tests,dev --no-root && \
poetry build -f wheel -n && \
pip install --no-cache-dir --no-deps dist/*.whl && \
rm -rf dist *.egg-info
rm -rf dist ./*.egg-info


FROM python-base as final
FROM python-base AS final

COPY --from=dependencies $PYSETUP_PATH $PYSETUP_PATH

Expand Down

0 comments on commit b0ee56e

Please sign in to comment.