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

feat: first docker container running #67

Merged
merged 8 commits into from
Oct 24, 2023
Merged

Conversation

merklefruit
Copy link
Collaborator

@merklefruit merklefruit commented Oct 22, 2023

We can now boot Geth from inside Docker by running the opup command.
"It works on my machine" (but I can't make any reliability remarks yet)

Changes

The main addition is the create_dockerfile_build_context() function in the composer crate. It allows us to generate a "build context" for any image we might want to build from scratch. You just need to supply a Dockerfile and any necessary files that are referenced inside it. They are then added to a tarball archive and gzipped, and fed to the native build_image Docker API.

Also now we can pattern match on client enum variants to have separate functions for each of them:

match self.l1_client {
    L1Client::Geth => self.start_geth().await?,
    _ => unimplemented!("l1 client not implemented: {}", self.l1_client),
}

I realize this is bad for client generalization (aka: bring your own client by just touching a TOML) but we're not there yet!

@merklefruit merklefruit changed the title wip: make first docker stages work feat: make first docker stages work Oct 23, 2023
@merklefruit merklefruit changed the title feat: make first docker stages work feat: first docker container running Oct 23, 2023
@merklefruit merklefruit self-assigned this Oct 23, 2023
@merklefruit merklefruit added C-critical Category: Modifies critical code A-composer Area: op-composer related labels Oct 23, 2023
@merklefruit merklefruit marked this pull request as ready for review October 23, 2023 20:22
Copy link
Collaborator

@refcell refcell left a comment

Choose a reason for hiding this comment

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

Very very nice

@refcell refcell added this pull request to the merge queue Oct 24, 2023
Merged via the queue into main with commit 0be9424 Oct 24, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-composer Area: op-composer related C-critical Category: Modifies critical code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants