Fix: Add ARM64 support for docker-compose.dev.yml and add start-dev.s… #339
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
FIXES #308
This Pull Request adds proper ARM64 (Apple Silicon) support to the FOSSologyUI development environment.
Previously, the development setup failed on Apple Silicon machines because Docker pulled the wrong architecture image (linux/arm64), while the FOSSology backend only supports linux/amd64.
Please describe the changes in your pull request in few words here.
Changes
In docker-compose.dev.yml, the backend service now specifies: platform: ${DOCKER_PLATFORM:-linux/amd64}
This ensures:
• x86_64 users = no change
• ARM64 users = automatic use of linux/amd64 via emulation (QEMU)
✔️ 2. Adds start-dev.sh script
New helper script that:
• Detects CPU architecture (arm64 vs x86_64)
• Sets DOCKER_PLATFORM=linux/amd64 automatically for Apple Silicon
• Runs the correct docker-compose commands
This improves the developer experience and prevents architecture errors.
List the changes done to fix a bug or introducing a new feature.
How to test
Testing was completed following project guidelines:
1. ARM64 (Apple Silicon) Testing
• ./start-dev.sh correctly detected ARM64.
• docker-compose.dev.yml successfully pulled linux/amd64 images.
• UI accessible at http://localhost:3000.
• Backend responding correctly on port 8081.
2. Manual architecture override
DOCKER_PLATFORM=linux/amd64 docker-compose -f docker-compose.dev.yml up
3. Lint & build tests
• npm install
• npm run lint
4. Verified no unnecessary files were included
(.pnpm-store and other local folders not committed)
This improves the developer experience and prevents architecture errors.
Describe the steps required to test the changes proposed in the pull request.
How to Test
1. Checkout the PR branch
git fetch origin
git checkout
2. Run the updated dev setup script
chmod +x start-dev.sh
./start-dev.sh
This will auto-detect system architecture (ARM64/x86_64) and apply the correct Docker platform.
3. Verify containers start correctly
• UI should run on http://localhost:3000
• Backend fossology_server should run on http://localhost:8081
4. For ARM64 (Apple Silicon) users:
Confirm backend runs using linux/amd64 emulation:
docker inspect fossologyui_server | grep Architecture
5. Stop the environment
docker compose -f docker-compose.dev.yml down
Please consider using the closing keyword if the pull request is proposed to
fix an issue already created in the repository
(https://help.github.com/articles/closing-issues-using-keywords/)