Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PB 887 Fix dockerfile to use pipenv sync instead of install #73

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

schtibe
Copy link
Contributor

@schtibe schtibe commented Aug 13, 2024

Noticing that the build fail on my last PR I did a little digging on why this is happening. I was able to reproduce the problem locally (docker build . ). The offending line is the one where pipenv installs the dependencies.

I compared the Dockerfile to the one in service-stac and noticed that in service-stac the command sync is used together with the Pipfile.lock file, which to me makes total sense, so I changed it here too.

Now since I have no clue about service-kml I don't know if this is a good idea and how to test if it still works.

Instead of the legacy docker-compose
The docker build command failed when it was done via `pipenv install`.
Instead, we use the Pipenv.lock file and the `pipenv sync` command to
install the dependencies for the docker container
@github-actions github-actions bot added the bug label Aug 13, 2024
Copy link
Member

@hansmannj hansmannj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing.
If I understood correctly, sync makes sense here, as it will install the exact versions of the Pipfile, while install might try to use newer versions.
So IMHO the service should work fine with the changes you suggest.

The tests seem to pass, which is a good sign 😉

@schtibe schtibe changed the title Bug pb 887 docker build failure PB 887 docker build failure Aug 15, 2024
@schtibe schtibe changed the title PB 887 docker build failure PB 887 Fix dockerfile to use pipenv sync instead of install Aug 15, 2024
@schtibe schtibe merged commit ec5b061 into develop Aug 15, 2024
9 checks passed
@schtibe schtibe deleted the bug-pb-887-docker-build-failure branch August 15, 2024 06:56
ltshb added a commit that referenced this pull request Sep 17, 2024
Due to last PR #73 the docker image was missing all dependencies because
pipenv sync install dependencies in virtual environment.

To solve this we moved to build stages which also fix a security issue in which
we had pipenv installed in container image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants