-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feature(scripts): Add a buildscript for a local superchain docker #20341
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Hi @jusdino apologies for the long delay. Could you confirm what OS you are experience the permissions issues with? I suspect you're on Linux, which has well-documented issues with file permissions in shared volumes. Usually this is the other way around though, you wouldn't be able to access files created in the container. |
Yessir. I'm running Amazon Linux 2 :) For the permissions issues being the other-way-round usually, I suspect that would be when the docker container is |
@jusdino Apologies for the delay. Can you confirm that it's the packing part The jsii/superchain is maintained in a different repo, so I'm not convinced adding the local build here is the right thing to do. Furthermore I'm investigating other solutions. Have you tried anything else that didn't end up working? |
@mrgrain , anything that involved writing any file to the project would fail, so
This is why it seemed my best option was to rig the |
Thanks again for your response @jusdino I'm trying to correctly understand your use case. Is your workflow to checkout the code on the host, then run From our perspective One thing that's not great at the moment are VSCode Devcontainers. I think this it would benefit a large number of people. There also appears to be a built-in support for the permissions issue. Is that a solution you'd be interested in? [1] GitPod, and to a lesser degree GitHub Codespaces |
Yeah that all makes a lot of sense to me. So my use case mostly boils down to this: |
Okay, I finally had time to look a bit further into this and it seems like there are a few more issues with the current documentation around packaging. I think we will be much better served improving the docs, than explicitly supporting every use case. I'll be closing this PR in the next few days and will try to follow up with documentation improvements soon. It seems like there are good workarounds for you and I recommend you keep the superchain Dockerfile with your uid/gid around. No promises, but maybe the source repo for superchain would be open to a PR that adds |
Makes sense! Thanks for digging! |
I don't know if this is useful for you but, in case it is, here's what I did to make local development and building a little more convenient:
Related to #20041, I found that the jsii/superchain docker image ran into issues accessing the mounted-in filesystem because of mismatch between local file ownership and the container user/group. This local image buildscript gets past that by setting up a user inside a local version of the superchain image that has the needed uid and gid, and is a member of the
docker
group. With this script I was able to build all ofaws-cdk-lib
like so:This local-image-build approach has the benefit of enjoying the benefits of using the entire toolchain from superchain, while still being able to produce artifacts that are owned with the right local permissions.
All Submissions:
Adding new Unconventional Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license