-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
I think the docker file needs to have the docker binary installed then |
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. |
Should also add a note in the readme about docker-in-docker and how to run it correctly. |
1eb5308
to
4fa7866
Compare
There was a problem hiding this 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.
4fa7866
to
c6d78d7
Compare
There was a problem hiding this 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.
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.