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

fix: introduce create-only-if-needed functions for containers and images #1493

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tippenein
Copy link
Collaborator

closes #1455

The main addition here is create_image_if_needed and the container_if_needed is seemingly only needed for postgres. There is a bit of a discrepancy with what to do when we hit already existing containers. Currently it uses it, but alternatively we could drop and recreate for postgres..

this current functionality allows me to clarinet devnet start with wifi off.

@tippenein tippenein changed the base branch from main to develop July 1, 2024 03:20
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 193 lines in your changes missing coverage. Please review.

Files Patch % Lines
components/stacks-network/src/orchestrator.rs 0.00% 193 Missing ⚠️

📢 Thoughts on this report? Let us know!

@hugocaillard
Copy link
Collaborator

hugocaillard commented Jul 1, 2024

@tippenein
Regarding the original issue (#1455), I was wondering if you could make it work with native docker behaviors, either by building images with --pull false (docker build --pull=false <...> ) or when starting the container docker run --pull=never <....>

With this in mind, I wonder if any code change if needed

@tippenein
Copy link
Collaborator Author

You would still need to list out the existing images/containers to see if a pull=false would even work, right? Like, if you are running this for the first time, the pull=false build would just fail.

@hugocaillard
Copy link
Collaborator

@tippenein If we build our images with --pull false, I think it would still try to pull it it doesn't exist.
The documentation says that --pull: _Always_ attempt to pull all referenced images, I'm assuming that pull false only make it so docker pulls it only if it needs to

@tippenein
Copy link
Collaborator Author

I'll experiment with this a little and see if we can simplify. I think you're right

@hugocaillard
Copy link
Collaborator

Switching to draft for now will it's still wip

@hugocaillard hugocaillard marked this pull request as draft July 3, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

Devnet should work offline if the Docker images exist locally
2 participants