Conversation
Build image failure from the CI process. |
It's still |
|
m1 arm64 have to excute socat TCP-LISTEN:2375,range=127.0.0.1/32,reuseaddr,fork UNIX-CLIENT:/var/run/docker.sock
export DOCKER_HOST=tcp://127.0.0.1:2375before run bash ./test/plugin/run.sh -f ${scenario_name} |
|
You could use shell to check and run more. |
|
@zhyyu Would you continue this? |
Yes, I will continue. These days my work is busy, I will go on when I am free. |
|
The m1 user have to install socat. |
|
You could add through CI, and update docs to help on local use. |
Can you explain or paste some related links about why the |
https://stackoverflow.com/questions/71300031/docker-image-build-failed-on-mac-m1-chip , the second answer https://juejin.cn/post/7094919855643557896 https://nxt.engineering/blog/kafka-docker-image/ https://dmp.fabric8.io/ the 3. Global configuration section, DOCKER_HOST description |
kezhenxu94
left a comment
There was a problem hiding this comment.
Don't have a m1 machine to verify, just some code level review.
| parse_commandline "$@" | ||
|
|
||
| if [[ $(uname) == 'Darwin' ]] && [[ $(uname -m) == 'arm64' ]]; then | ||
| nohup socat TCP-LISTEN:2375,range=127.0.0.1/32,reuseaddr,fork UNIX-CLIENT:/var/run/docker.sock > /dev/null 2>&1 & |
There was a problem hiding this comment.
Can you add a trap to capture the exit signal and kill this process so when the tests finished this can be released? Otherwise this process is still running even when the tests finished.
There was a problem hiding this comment.
From the document, https://github.com/fabric8io/docker-maven-plugin/blob/master/doc/changelog.md
The M1 support has already been added from 0.38.1 and I've run this patch without socat, everything is fine.
There was a problem hiding this comment.
From the document, https://github.com/fabric8io/docker-maven-plugin/blob/master/doc/changelog.md
The M1 support has already been added from
0.38.1and I've run this patch withoutsocat, everything is fine.
What version of mac m1 docker desktop are you using?
There was a problem hiding this comment.
I use the newest version of m1 docker desktop, still error if not use socat
[INFO]
[INFO] --- docker-maven-plugin:0.40.2:build (build) @ tomcat-container ---
./test/plugin/run.sh: line 186: 50210 Killed: 9 ${mvnw} --batch-mode -f ${home}/pom.xml -DskipTests -Dbase_image_java=${base_image_java} -Dbase_image_tomcat=${base_image_tomcat} -Dcontainer_image_version=${container_image_version} clean package
There was a problem hiding this comment.
Can you add a
trapto capture the exit signal and kill this process so when the tests finished this can be released? Otherwise this process is still running even when the tests finished.
I have removed socat nohup, when the run.sh exit, socat exit.
There was a problem hiding this comment.
I've confirmed with another laptop (13' M2 2022). Previously I've checked on my Mac Studio with M1 Ultra. Still the same results.
$ bash ./test/plugin/run.sh -f spring-4.3.x-scenarioI'm using the default configuration with Docker Desktop 4.13.1 (90346),
I guess your jvm may not be built for arm64. Anyway, I don't think socat is necessary.
There was a problem hiding this comment.
@lujiajing1126 Could you submit another PR to bump up the version?
Then I could do another round check locally on my M1 Max.
There was a problem hiding this comment.
@lujiajing1126 Could you submit another PR to bump up the version? Then I could do another round check locally on my M1 Max.
Sure
|
I will do local verification on my M1 Max once everything is ready for CI and @kezhenxu94 's review. |
In the link https://stackoverflow.com/a/71301494/5200161, the other answer suggests switching to fabric8-maven-plugin, dockerfile-maven-plugin from Spotify is inactive for a long time so I think for any reason we should switch to fabric8. |
|
The changes in this PR is a workaround and not a long-term solution in my opinion. |
|
Or, we can even just use exec maven plugin to execute the Docker command, this has the best compatibility. But we need to extract the existing maven configurations into a Dockerfile. Like https://github.com/apache/dolphinscheduler/blob/cd5fb12e46026f224ed24ad52a6e8711ff212cfe/pom.xml#L436-L466 |
|
@zhyyu What is the status of this PR? |
| parse_commandline "$@" | ||
|
|
||
| if [[ $(uname) == 'Darwin' ]] && [[ $(uname -m) == 'arm64' ]]; then | ||
| nohup socat TCP-LISTEN:2375,range=127.0.0.1/32,reuseaddr,fork UNIX-CLIENT:/var/run/docker.sock > /dev/null 2>&1 & |
There was a problem hiding this comment.
From the document, https://github.com/fabric8io/docker-maven-plugin/blob/master/doc/changelog.md
The M1 support has already been added from 0.38.1 and I've run this patch without socat, everything is fine.
|
On my local m1 mac, If I don't use socat, this error happen. |
…th-m1 # Conflicts: # test/plugin/agent-test-tools/pom.xml
|
#379 works. |



CHANGESlog.