fix: Fixes #2464 Replace git use for finding project root. Dedicated dockerignore with .git/ for 277MB image#1
fix: Fixes #2464 Replace git use for finding project root. Dedicated dockerignore with .git/ for 277MB image#1
Conversation
…re with .git folder for 277MB image size
015cd59 to
0221536
Compare
|
Uhm why is this MR in your repo? |
sorry i should have tagged reviewers later... this is still a WIP with a draft PR description... because it's based on branch 'luke/13071-fix-ldd-error', which is only a branch in ltfschoen/substrate, and is still an active PR into 'master' of paritytech/substrate, so if i try to create a dedicated PR into paritytech/substrate 'master' from ltfschoen/substrate branch 'luke/2464-optimise-docker' then it shows changes from all commits from both branch 'luke/13071-fix-ldd-error' and 'luke/2464-optimise-docker' combined (instead of only showing 'luke/2464-optimise-docker' changes), but if 'luke/13071-fix-ldd-error' gets merged into 'master' of paritytech/substrate, then i can create a PR directly into 'master' of paritytech/substrate and it'll only show the 'luke/2464-optimise-docker' changes. so my plan was to wait until 'luke/13071-fix-ldd-error' was merged into 'master' of paritytech/substrate, and then create a PR from branch 'luke/2464-optimise-docker' of ltfschoen/substrate into 'master' of paritytech/substrate, but in the interim while its still in my repo i wrote a draft PR description.... in hindsight i probably should have added tags for reviewers later on when i'd actually created the PR into 'master' of paritytech/substrate |
FYI, i tried to get it to work with Alpine Linux instead of Ubuntu, but i could only reduce it to 236MB instead of 277MB, and i could only get it to work if i disabled the |
followed these instructions https://stackoverflow.com/a/57774684/3208553 to create a custom ./docker/substrate_builder.Dockerfile.dockerignore that is dedicated to ./docker/substrate_builder.Dockerfile with fallback to ./.dockerignore
checked current disk usage:
added contents of .dockerignore to ./docker/substrate_builder.Dockerfile.dockerignore,
then added extra folders like .git/ to it too
used a different approach to obtaining the
PROJECT_ROOTthat didn't involve usinggitcommand based on this stackoverflow suggestion https://stackoverflow.com/a/57774684/3208553built the image
Fixes #228orRelated #1337.TODO