Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Specify --platform when running solc Docker image #5080

Merged
merged 1 commit into from
May 4, 2022

Conversation

gnidan
Copy link
Contributor

@gnidan gnidan commented May 4, 2022

I noticed a warning when using Dockerized solc on M1 Macs, since the solc images are distributed for x64, and Docker throws a warning to suggest specifying --platform directly:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

This PR does just that, and the warning goes away!

(In the future, if solc distributes Docker images for other platforms, we might want to revisit this... but I'm guessing that's pretty unlikely)

... to avoid a warning on mismatched architectures (like Apple M1s)
Copy link
Contributor

@haltman-at haltman-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this makes sense... @gnidan, you say this works and makes the warning go away, so I don't see any problem with this.

@gnidan
Copy link
Contributor Author

gnidan commented May 4, 2022

I guess this makes sense... @gnidan, you say this works and makes the warning go away? If so I don't see any problem with this.

Yep! As you might've guessed, I did this work because I wanted to avoid an ugly warning in a live demo, and this change successfully achieved that goal :)

Thanks!

@gnidan gnidan merged commit 5349a06 into develop May 4, 2022
@gnidan gnidan deleted the fix/m1-docker-solc-warning branch May 4, 2022 20:41
Copy link
Member

@cds-amal cds-amal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @gnidan!
Minor point, Is it possible to add the actual warning, so it's available for the audit trail?

@gnidan
Copy link
Contributor Author

gnidan commented May 4, 2022

Is it possible to add the actual warning, so it's available for the audit trail?

Sure, where do you want me to add it? Just in the PR description?

@cds-amal
Copy link
Member

cds-amal commented May 4, 2022

The PR description is a good backup. Having it in a git-commit body would have been the best :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants