CircleCI-Public / cimg-shared

Shared resources for prototype convenience images
MIT License
12 stars 14 forks source link

specify --platform linux/amd64 when build docker image #78

Closed mkusaka closed 1 year ago

mkusaka commented 1 year ago

The --platform linux/amd64 is now explicitly specified.


When trying to build cimg-ruby(browsers) or other packages on M1 mac, the following error may occur due to platforms not supported by some packages.

 => ERROR [6/6] RUN wget -q -O - "https://dl.google.com/linux/linux_signing_key.pub" | sudo apt-key add - && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list && sudo apt-get update && sudo apt-get install google-chrome-stable && sudo rm -rf /var/lib/apt/lists/* 8.3s 

This can be worked around by explicitly specifying the --platform option in the docker build.