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

Mac M1 Support #1155

Open
ryanjbaxter opened this issue Nov 30, 2022 · 18 comments
Open

Mac M1 Support #1155

ryanjbaxter opened this issue Nov 30, 2022 · 18 comments
Assignees
Labels

Comments

@ryanjbaxter
Copy link
Contributor

@wind57 did you ever come to a solution for this problem with regards to building spring-cloud-kubernetes on an M1 Mac?
paketo-buildpacks/stacks#51

@wind57
Copy link
Contributor

wind57 commented Nov 30, 2022

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...

@ryanjbaxter
Copy link
Contributor Author

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?

@wind57
Copy link
Contributor

wind57 commented Dec 1, 2022

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 .

@ryanjbaxter
Copy link
Contributor Author

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

@wind57
Copy link
Contributor

wind57 commented Dec 1, 2022

if you do docker inspect --format='{{.Os}}/{{.Architecture}}' springcloud/spring-cloud-kubernetes-discoveryserver:3.0.0-SNAPSHOT do you see linux/arm64?

@ryanjbaxter
Copy link
Contributor Author

Yup

$ docker inspect --format='{{.Os}}/{{.Architecture}}' docker.io/springcloud/spring-cloud-kubernetes-discoveryclient-it:3.0.0-SNAPSHOT
linux/arm64

@wind57
Copy link
Contributor

wind57 commented Dec 1, 2022

weird :| I'll remove my docker desktop and give it a shot from scratch.

@wind57
Copy link
Contributor

wind57 commented Dec 1, 2022

same even if I download from scratch. are you sure you downloaded docker for arm?

@ryanjbaxter
Copy link
Contributor Author

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.

@wind57
Copy link
Contributor

wind57 commented Dec 2, 2022

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.

@wind57
Copy link
Contributor

wind57 commented Dec 2, 2022

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?

@ryanjbaxter
Copy link
Contributor Author

docker run starts fine.

The error is coming from the logs within the testcontainer.

@wind57
Copy link
Contributor

wind57 commented Dec 2, 2022

I assume that happens when you issue kubectl get events right inside the testcontainer, right? also what integration test is that?

@ryanjbaxter
Copy link
Contributor Author

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.

@ryanjbaxter ryanjbaxter self-assigned this Dec 3, 2022
@wind57
Copy link
Contributor

wind57 commented Dec 3, 2022

no worries at all and thank you for trying to ping someone on the buildpacks team.

@ryanjbaxter
Copy link
Contributor Author

Any tips on running the integration tests on kind in the 2.1.x branch?

@wind57
Copy link
Contributor

wind57 commented Dec 6, 2022

I remember having some custom scripts when I was running those, but since we moved to testcontainers, I deleted them :( Sorry

@ryanjbaxter
Copy link
Contributor Author

No worries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants