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

Port Raudi to python_on_whales #21

Merged
merged 3 commits into from Jan 13, 2022
Merged

Port Raudi to python_on_whales #21

merged 3 commits into from Jan 13, 2022

Conversation

frost19k
Copy link
Contributor

This PR replaces the docker-py library with python_on_whales.

Justification:

  • docker-py does not (and possibly, will not) support Buildkit. Issue #2230
  • Not having access to BuildKit means that raudi.py is restricted to using only the simplest Dockerfiles.
  • For full details regarding the advatages of BuildKit please refer to the blog post.
  • Additionally, since python_on_whales is essentially a wrapper around Docker CLI, it is a lot simpler to implement & maintain ( for e.g. check_if_docker_image_exists_local() in helper.py is now just one line! )

Changes:

  • I've updated build() & push() in raudi.py with the new syntax. I've tested the build() function & confirmed that it works correctly (see Add "dev" branch for experimental features #20) - but I have not tested push().
  • In helper.py I updated the code in check_if_docker_image_exists_local() & check_if_container_runs(). Please mind my comments in the latter.
  • While I added python_on_whales in requirements.txt I did not remove docker. This is merely to facilitate debugging & it should be removed before merging into main.

As far as I'm aware - that should be everything. Apologies if I missed something.

@thelicato
Copy link
Member

Thank you very much! We will test everything in the next couple days and if everything is ok we will merge it into main.

@thelicato thelicato merged commit ad4136c into cybersecsi:develop Jan 13, 2022
@frost19k frost19k deleted the develop branch February 9, 2022 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants