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

Allow to install on Apple Silicon with Rosetta enabled #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@ pre_install_actions:
# https://github.com/microsoft/mssql-docker/issues/734#issuecomment-1382358649
#ddev-nodisplay
#ddev-description:Check architecture type for incompatible arm64 type
if [ "$(arch)" = "arm64" -o "$(arch)" = "aarch64" ]; then
echo "This package does not work on arm64 machines";
exit 1;
# If cpu is Apple branded, use arch binary to check if x86_64 code can run
if [[ "$(sysctl -n machdep.cpu.brand_string)" == *'Apple'* ]]; then
if arch -x86_64 /usr/bin/true 2> /dev/null; then
echo "To make this package work on arm64 machines, Rosetta is used.";
else
echo "This package does not work on arm64 machines, unless Rosetta is enabled.";
echo "If needed, run /usr/sbin/softwareupdate –install-rosetta –agree-to-license";
echo "Make sure Rosetta is enabled in your Docker provider.";
exit 1;
fi
else
if [ "$(arch)" = "arm64" -o "$(arch)" = "aarch64" ]; then
echo "This package does not work on arm64 machines";
exit 1;
fi
fi
- |
# If there was an existing .ddev/web-build/Dockerfile.sqlsrv we need to remove it
Expand Down
Loading