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

PR-6094 Add Docker-in-Docker support #200

Merged
merged 4 commits into from
Sep 11, 2024
Merged

PR-6094 Add Docker-in-Docker support #200

merged 4 commits into from
Sep 11, 2024

Conversation

reweeden
Copy link
Contributor

@reweeden reweeden commented Aug 6, 2024

Method taken from here: https://devopscube.com/run-docker-in-docker/

This method works well for pulling/pushing images but things get weird when you need to interact with the host filesystem such as when mounting a docker volume. The files mounted to the inner container will come directly from the host system and not from within the CIRRUS-core container. This makes writing the correct paths in the makefile a lot more tricky, since volume mounts want an absolute path and the absolute path on the host vs inside the container will not be the same.

We need this for ASF to be able to deploy some of our workflows that build and push container images to ECR for our step function activity tasks. Our CI has it set up already because it builds and runs the container image using a different command, but for local development we would want this capability in the CIRRUS-core makefile.

@mattp0
Copy link
Contributor

mattp0 commented Aug 8, 2024

I think the docker file needs to have the docker binary installed then

@reweeden
Copy link
Contributor Author

reweeden commented Aug 8, 2024

Yea, in order to rewrite our build process to call docker from the Makefile we'll need to do that. The terraform provider doesn't need it installed however, and that's currently all we're using this for so maybe not strictly necessary for this PR? Mostly this was just to ensure that you can continue to run the deployment locally.

@reweeden
Copy link
Contributor Author

reweeden commented Aug 8, 2024

Should also add a note in the readme about docker-in-docker and how to run it correctly.

Copy link
Contributor

@mckadesorensen mckadesorensen left a comment

Choose a reason for hiding this comment

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

Looks good to me. Since this is a PR to CIRRUS-core, we should request Mike and Chris to review it.

@reweeden reweeden changed the title Add Docker-in-Docker support PR-6094 Add Docker-in-Docker support Sep 11, 2024
Copy link
Collaborator

@lindsleycj lindsleycj left a comment

Choose a reason for hiding this comment

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

I confirmed the new target worked as expected. The rest looks good to me.

@reweeden reweeden merged commit 0bfd533 into master Sep 11, 2024
2 checks passed
@reweeden reweeden deleted the rew/docker-in-docker branch September 11, 2024 19:11
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.

5 participants