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

Optimized Dockerfile #577

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Optimized Dockerfile #577

wants to merge 1 commit into from

Conversation

alrs
Copy link

@alrs alrs commented May 24, 2024

This creates a new Dockerfile to be used with the compile-with-docker.sh script.

The original Dockerfile copies code into the container and creates compiled firmware owned by root. This one mounts the repo as a volume under /app. The compilation step is run by the current userid instead of root. The resultant artifacts are correctly chmodded to 644, as they are not executables. The stray copy of firmware.ld that shows up in compiled-firmware is now omitted. This Dockerfile brings in fewer dependencies, in my case decreasing the size of the build container from 4.24GB to 3.75GB.

The same approach could likely be taken with compile-with-docker.bat, but I don't have a Windows system here for development.

Fixes #576

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.

compile-with-docker.sh generates files owned by root
1 participant