Skip to content

Commit

Permalink
fix: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren committed Nov 22, 2024
1 parent 3d9e624 commit 5d57176
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions docker/Dockerfile.api
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ ENV PIP_DEFAULT_TIMEOUT=100 \
RUN pip install "poetry==$POETRY_VERSION"
RUN python -m venv /venv
COPY pyproject.toml poetry.lock ./
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes && /venv/bin/python -m pip install --upgrade -r requirements.txt
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes --only main && \
/venv/bin/python -m pip install --upgrade -r requirements.txt && \
pip uninstall -y poetry
COPY keep keep
COPY ee keep/ee
COPY examples examples
RUN poetry build && /venv/bin/pip install --use-deprecated=legacy-resolver dist/*.whl

RUN /venv/bin/pip install --use-deprecated=legacy-resolver . && \
rm -rf /root/.cache/pip && \
find /venv -type d -name "__pycache__" -exec rm -r {} + && \
find /venv -type f -name "*.pyc" -delete

FROM base as final
ENV PATH="/venv/bin:${PATH}"
Expand All @@ -33,9 +37,9 @@ COPY --from=builder /app/examples /examples
# Build the providers cache
RUN keep provider build_cache
# as per Openshift guidelines, https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images
RUN chgrp -R 0 /app && chmod -R g=u /app
RUN chown -R keep:keep /app
RUN chown -R keep:keep /venv
RUN chgrp -R 0 /app && chmod -R g=u /app && \
chown -R keep:keep /app && \
chown -R keep:keep /venv
USER keep

ENTRYPOINT ["/venv/lib/python3.11/site-packages/keep/entrypoint.sh"]
Expand Down

0 comments on commit 5d57176

Please sign in to comment.