Mac M1 Support
@wind57 did you ever come to a solution for this problem with regards to building spring-cloud-kubernetes on an M1 Mac? https://github.com/paketo-buildpacks/stacks/issues/51
I did not. I was lazy and took the path of least resistance. I have docker files everywhere in this project, and that is why .gitignore has an entry for dockerfiles...
OK I can find someone on the buildpacks team and try and bug them I think.
In the meantime do you have a sample dockerfile?
My docker files are very simple:
FROM bellsoft/liberica-openjdk-debian
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
and then I build with :
mvn clean install -Dskip.build.image=true -DskipITs -DskipTests -T 1C -U
and to build an arm image:
docker buildx build --platform linux/arm64 -t springcloud/spring-cloud-kubernetes-discoveryserver:3.0.0-SNAPSHOT .
Even doing that I still am seeing
CreateContainerError: failed to create containerd container: error unpacking image: failed to resolve rootfs: content digest sha256:46f453b1b70ba9645399e1ce83c2412e67cb101e7da1189d28c73d83bc9d6619: not found
if you do docker inspect --format='{{.Os}}/{{.Architecture}}' springcloud/spring-cloud-kubernetes-discoveryserver:3.0.0-SNAPSHOT do you see linux/arm64?
Yup
$ docker inspect --format='{{.Os}}/{{.Architecture}}' docker.io/springcloud/spring-cloud-kubernetes-discoveryclient-it:3.0.0-SNAPSHOT
linux/arm64
weird :| I'll remove my docker desktop and give it a shot from scratch.
same even if I download from scratch. are you sure you downloaded docker for arm?
Yeah I reinstalled it just to make sure. How are you running the test then? I am just running the unit test from Intellij after I build the container.
same thing. can you run a docker run ... on the image that you just build? this is super awkward, we are missing something obvious here, I am sure.
btw, where do you get this error:
CreateContainerError: failed to create containerd container: error unpacking image: failed to resolve rootfs: content digest sha256:46f453b1b70ba9645399e1ce83c2412e67cb101e7da1189d28c73d83bc9d6619: not found
I wonder if I have something installed that I do not remember now... Do you have Rosetta installed?
docker run starts fine.
The error is coming from the logs within the testcontainer.
I assume that happens when you issue kubectl get events right inside the testcontainer, right? also what integration test is that?
Im such a dummy. I thought it was the integration test container giving that error, it was the container for the discovery server. Once I built the discovery server image with the Dockerfile it worked 🤦♂️. Sorry about that.
I am traveling next week but maybe after the holidays I can try and get some help from someone on the buildpacks team to sort this out.
no worries at all and thank you for trying to ping someone on the buildpacks team.
Any tips on running the integration tests on kind in the 2.1.x branch?
I remember having some custom scripts when I was running those, but since we moved to testcontainers, I deleted them :( Sorry
No worries