-
Notifications
You must be signed in to change notification settings - Fork 46
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
Support for Mac M1 #192
Comments
I tinkered araound a little bit more and have some new insights and got it nearly running. You can remove the warning form the bootstrap command if you add
docker run -i --rm "${userToRun[@]}" \
-e SPRYKER_DOCKER_SDK_PLATFORM="${_PLATFORM}" \
-e SPRYKER_DOCKER_SDK_DEPLOYMENT_DIR="${DESTINATION_DIR}" \
-e VERBOSE="${VERBOSE}" \
--platform linux/amd64 \
-v "${tmpDeploymentDir}":/data/deployment:rw \
spryker_docker_sdk To Fix the # ...
function Images::_buildApp() {
local -a sshArgument=()
local folder=${1}
local baseAppImage="${SPRYKER_DOCKER_PREFIX}_base_app:${SPRYKER_DOCKER_TAG}"
local appImage="${SPRYKER_DOCKER_PREFIX}_app:${SPRYKER_DOCKER_TAG}"
local localAppImage="${SPRYKER_DOCKER_PREFIX}_local_app:${SPRYKER_DOCKER_TAG}"
local runtimeImage="${SPRYKER_DOCKER_PREFIX}_run_app:${SPRYKER_DOCKER_TAG}"
local baseCliImage="${SPRYKER_DOCKER_PREFIX}_base_cli:${SPRYKER_DOCKER_TAG}"
local cliImage="${SPRYKER_DOCKER_PREFIX}_cli:${SPRYKER_DOCKER_TAG}"
local runtimeCliImage="${SPRYKER_DOCKER_PREFIX}_run_cli:${SPRYKER_DOCKER_TAG}"
if [ -n "${SSH_AUTH_SOCK_IN_CLI}" ]; then
sshArgument=('--ssh' 'default')
fi
Images::_prepareSecrets
Registry::Trap::addExitHook 'removeBuildSecrets' "rm -f ${SECRETS_FILE_PATH}"
Console::verbose "${INFO}Building Application images${NC}"
docker build \
-t "${baseAppImage}" \
-f "${DEPLOYMENT_PATH}/images/common/application/Dockerfile" \
--progress="${PROGRESS_TYPE}" \
--build-arg "SPRYKER_PLATFORM_IMAGE=${SPRYKER_PLATFORM_IMAGE}" \
--build-arg "SPRYKER_LOG_DIRECTORY=${SPRYKER_LOG_DIRECTORY}" \
--build-arg "SPRYKER_PIPELINE=${SPRYKER_PIPELINE}" \
--build-arg "APPLICATION_ENV=${APPLICATION_ENV}" \
--build-arg "SPRYKER_DB_ENGINE=${SPRYKER_DB_ENGINE}" \
--build-arg "KNOWN_HOSTS=${KNOWN_HOSTS}" \
--build-arg "SPRYKER_BUILD_HASH=${SPRYKER_BUILD_HASH:-"current"}" \
--build-arg "SPRYKER_BUILD_STAMP=${SPRYKER_BUILD_STAMP:-""}" \
"${DEPLOYMENT_PATH}/context" 1>&2
docker build \
-t "${appImage}" \
-f "${DEPLOYMENT_PATH}/images/${folder}/application/Dockerfile" \
"${sshArgument[@]}" \
--secret "id=secrets-env,src=$SECRETS_FILE_PATH" \
--progress="${PROGRESS_TYPE}" \
--build-arg "SPRYKER_PARENT_IMAGE=${baseAppImage}" \
--build-arg "SPRYKER_DOCKER_PREFIX=${SPRYKER_DOCKER_PREFIX}" \
--build-arg "SPRYKER_DOCKER_TAG=${SPRYKER_DOCKER_TAG}" \
--build-arg "USER_UID=${USER_FULL_ID%%:*}" \
--build-arg "DEPLOYMENT_PATH=${DEPLOYMENT_PATH}" \
--build-arg "SPRYKER_PIPELINE=${SPRYKER_PIPELINE}" \
--build-arg "APPLICATION_ENV=${APPLICATION_ENV}" \
--build-arg "SPRYKER_DB_ENGINE=${SPRYKER_DB_ENGINE}" \
--build-arg "SPRYKER_COMPOSER_MODE=${SPRYKER_COMPOSER_MODE}" \
--build-arg "SPRYKER_COMPOSER_AUTOLOAD=${SPRYKER_COMPOSER_AUTOLOAD}" \
--build-arg "SPRYKER_BUILD_HASH=${SPRYKER_BUILD_HASH:-"current"}" \
--build-arg "SPRYKER_BUILD_STAMP=${SPRYKER_BUILD_STAMP:-""}" \
--platform linux/amd64 \
. 1>&2
docker build \
-t "${localAppImage}" \
-t "${runtimeImage}" \
-f "${DEPLOYMENT_PATH}/images/common/application-local/Dockerfile" \
--progress="${PROGRESS_TYPE}" \
--build-arg "SPRYKER_PARENT_IMAGE=${appImage}" \
--platform linux/amd64 \
"${DEPLOYMENT_PATH}/context" 1>&2
if [ -n "${SPRYKER_XDEBUG_MODE_ENABLE}" ]; then
docker build \
-t "${runtimeImage}" \
-f "${DEPLOYMENT_PATH}/images/debug/application/Dockerfile" \
--progress="${PROGRESS_TYPE}" \
--build-arg "SPRYKER_PARENT_IMAGE=${localAppImage}" \
--platform linux/amd64 \
"${DEPLOYMENT_PATH}/context" 1>&2
fi
Console::verbose "${INFO}Building CLI images${NC}"
docker build \
-t "${baseCliImage}" \
-f "${DEPLOYMENT_PATH}/images/common/cli/Dockerfile" \
--progress="${PROGRESS_TYPE}" \
--build-arg "SPRYKER_PARENT_IMAGE=${localAppImage}" \
--platform linux/amd64 \
"${DEPLOYMENT_PATH}/context" 1>&2
docker build \
-t "${cliImage}" \
-t "${runtimeCliImage}" \
-f "${DEPLOYMENT_PATH}/images/${folder}/cli/Dockerfile" \
"${sshArgument[@]}" \
--secret "id=secrets-env,src=$SECRETS_FILE_PATH" \
--progress="${PROGRESS_TYPE}" \
--build-arg "SPRYKER_PARENT_IMAGE=${baseCliImage}" \
--build-arg "DEPLOYMENT_PATH=${DEPLOYMENT_PATH}" \
--build-arg "SPRYKER_PIPELINE=${SPRYKER_PIPELINE}" \
--build-arg "SPRYKER_BUILD_HASH=${SPRYKER_BUILD_HASH:-"current"}" \
--build-arg "SPRYKER_BUILD_STAMP=${SPRYKER_BUILD_STAMP:-""}" \
--platform linux/amd64 \
. 1>&2
if [ -n "${SPRYKER_XDEBUG_MODE_ENABLE}" ]; then
docker build \
-t "${runtimeCliImage}" \
-f "${DEPLOYMENT_PATH}/images/debug/cli/Dockerfile" \
--progress="${PROGRESS_TYPE}" \
--build-arg "SPRYKER_PARENT_IMAGE=${cliImage}" \
--platform linux/amd64 \
"${DEPLOYMENT_PATH}/context" 1>&2
fi
Registry::Trap::releaseExitHook 'removeBuildSecrets'
}
# ... Unfortunately there is a qemu bug in the elasticsearch image witch prevents spryker from fully working. |
Hi @thettler, Thanks for the last update, it's getting closer on my M1 mac, but after applying the changes you mentioned, and after waiting for a while, i get the following error message:
Do you know how to fix this issue? Thanks in advance, Camilo |
Hi all, I can confirm the same error as @camilou when using the workaround from @thettler with my MacBook Pro (13-inch, M1, 2020).
Any ideas how to solve this? Also are there plans to provide images for linux/arm64 ? |
Anyone fixed this yet? Or got around that issue? |
Same issue on fresh M1 MacBook Air with Docker for Silicone, as well. Would be great if someone could pick this up. |
Hello. Any news? Could you please answer when this problem can be resolved for MAC with M1 ? |
Hello, @DmitriyDem and sorry for the log response time. The support of the MAC with M1 is planned until the end of the Q4. If this is a blocker for you, you can take a look at the experimental branch. |
Thanks for response!✌️ |
Hi there.. |
Hi, |
I got a response in the slack channel that it was postponed to Q1 2022 |
Q1 is almost over, any updates on this? Shall we wait 2 more days or it got delayed to Q2? Thanks. |
To me personally a few weeks ago it was confirmed that it was not postponed, but at this point a day before the end of Q1 I actually have doubts that by tomorrow support for M1 can be officially released. |
In the end it does not matter if it's one or X weeks later. It's more about setting right expectations from spy team towards partners. As it was promised for 21/Q4 then 22/Q1, now its Q2, then maybe Q3 and so on... This is a major issue blocking me and my colleagues from switching to M1 macbooks. I am just trying to make this issue somehow more visible and maybe give it higher priority in your pipeline. Thanks |
I'm not an internal member of the Spryker, so I can only tell you what was communicated to me. In any case you are completely correct. Although I've been using Spryker Docker SDK with M1 for over a month now and have absolutely no issues whatsoever. So one thing is the official support and we are all right in complaining, secondly this is not a block at the moment because as I said you can work with it without any problem. p.s.: of course there is a guide (slack threads...) and some aspects to take into account for the project to be compatible etc... |
Ping (🍎 M1) soon comes the end of Q2 any news about the official support for M1? |
the current status - In QA. |
I just Seen that in Release 1.47.0 has been released the support for ARM Architecture. |
Hi, Small guidance how to make your project up and running with ARM architecture (M1) - https://docs.spryker.com/docs/scos/dev/technical-enhancement-integration-guides/switch-to-arm-architecture-m1-chip.html. Hi @ynnoig, |
Hi, @alexanderM91 Why was this requirement introduced how can we continue using 5.6? AFAIK the experimental M1 branch worked just fine with the older version... Also, I hope you're not planning to remove the experimental branch anytime soon - doing that might prevent some people from working with Spryker on their M1 completely. |
Hi @namikk, No, I am not planning to remove a temporary branch in the nearest future due to the migration process (approx. one month) but it will not be supported anymore. |
Which release, branch or hash of Docker SDK are you using?
1.30.0
Which operating system (platform/version/architecture) are you using?
Mac Os Big Sur, Mac Book Pro M1
What is the issue that you're experiencing?
On
docker/sdk bootstrap deploy.dev.yml
the warningWARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
appears.And if i try to start the containers with
docker/sdk up
this Error appears:What are the steps to reproduce the issue?
Simply try to install Spryker on an Mac M1 machine.
What is the expected result of these steps in the absence of the issue?
The Containers would be getting build und started.
What is the actual result?
The error appears and stops the Process
What possible solutions and/or workarounds for the issue do you see?
Make the Image ARM compatible. Or let it run through Rosetta 2.
Is there any other information that might be helpful?
The text was updated successfully, but these errors were encountered: