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

Add support for arm architectures in docker-compose.yml #2615

Open
cesumilo opened this issue Feb 28, 2024 · 8 comments · May be fixed by #2616
Open

Add support for arm architectures in docker-compose.yml #2615

cesumilo opened this issue Feb 28, 2024 · 8 comments · May be fixed by #2616

Comments

@cesumilo
Copy link
Contributor

Context

As a contributor, I would like to be able to run the docker-compose services on my ARM architecture machine (Macbook Pro M2).

Expected

docker-compose up # running

Actual

docker-compose up

[+] Running 1/2
 ⠙ mysql Pulling                                                                                                                                                                                                                                                                                                                                                                                                                               1.1s 
 ✘ postgres Error                                                                                                                                                                                                                                                                                                                                                                                                                              1.1s 
no matching manifest for linux/arm64 in the manifest list entries
@cesumilo cesumilo linked a pull request Feb 28, 2024 that will close this issue
1 task
@cesumilo
Copy link
Contributor Author

@lehni Here is the PR for QoL about ARM architectures

@lehni
Copy link
Collaborator

lehni commented Feb 29, 2024

Ok so the problem is that msysql doesn't have a manifest for linux/arm64. We should probably just switch to MariaDB instead, see: https://stackoverflow.com/a/65592942

@lehni
Copy link
Collaborator

lehni commented Feb 29, 2024

Or we could use docker-compose.override.yml, see: https://stackoverflow.com/a/68791503

@lehni
Copy link
Collaborator

lehni commented Feb 29, 2024

With the override file, I get:

docker-compose up
[+] Running 27/27
 ✔ mysql 11 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                              15.3s
   ✔ 20e4dcae4c69 Pull complete                                                                                                                                                       7.2s
   ✔ 1c56c3d4ce74 Pull complete                                                                                                                                                       4.4s
   ✔ e9f03a1c24ce Pull complete                                                                                                                                                       5.6s
   ✔ 68c3898c2015 Pull complete                                                                                                                                                       6.5s
   ✔ 6b95a940e7b6 Pull complete                                                                                                                                                       6.7s
   ✔ 90986bb8de6e Pull complete                                                                                                                                                       6.9s
   ✔ ae71319cb779 Pull complete                                                                                                                                                       8.0s
   ✔ ffc89e9dfd88 Pull complete                                                                                                                                                       7.5s
   ✔ 43d05e938198 Pull complete                                                                                                                                                       9.6s
   ✔ 064b2d298fba Pull complete                                                                                                                                                       8.1s
   ✔ df9a4d85569b Pull complete                                                                                                                                                       8.8s
 ✔ postgres 14 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                        10.0s
   ✔ f546e941f15b Pull complete                                                                                                                                                       1.7s
   ✔ 926c64b890ad Pull complete                                                                                                                                                       0.6s
   ✔ eca757527cc4 Pull complete                                                                                                                                                       0.7s
   ✔ 93d9b27ec7dc Pull complete                                                                                                                                                       1.8s
   ✔ 86e78387c4e9 Pull complete                                                                                                                                                       2.1s
   ✔ 8776625edd8f Pull complete                                                                                                                                                       2.4s
   ✔ d1afcbffdf18 Pull complete                                                                                                                                                       2.3s
   ✔ 6a6c8f936428 Pull complete                                                                                                                                                       2.6s
   ✔ ae47f32f8312 Pull complete                                                                                                                                                       6.4s
   ✔ 82fb85897d06 Pull complete                                                                                                                                                       2.8s
   ✔ ce4a61041646 Pull complete                                                                                                                                                       3.2s
   ✔ ca83cd3ae7cf Pull complete                                                                                                                                                       3.4s
   ✔ f7fbf31fd41d Pull complete                                                                                                                                                       3.9s
   ✔ 353df72b8bf7 Pull complete                                                                                                                                                       4.1s
[+] Building 0.0s (0/0)                                                                                                                                               docker:desktop-linux
[+] Running 3/3
 ✔ Network objection_default     Created                                                                                                                                              0.0s
 ✔ Container objection_postgres  Created                                                                                                                                              0.1s
 ✔ Container objection_mysql     Created                                                                                                                                              0.1s

@lehni
Copy link
Collaborator

lehni commented Feb 29, 2024

Using image: 'mariadb:lts' instead of image: 'mysql:5' seems to work without the change of arch, btw.

cesumilo added a commit to inarix/objection.js that referenced this issue Mar 1, 2024
@cesumilo
Copy link
Contributor Author

cesumilo commented Mar 1, 2024

@lehni Thanks for the investigation 🙏 What options is the best for you? I wasn't aware of the override option. I'm ok with both options 👌

@lehni lehni changed the title (QOL) Add support for arm architectures in docker-compose.yml Add support for arm architectures in docker-compose.yml Mar 3, 2024
@lehni
Copy link
Collaborator

lehni commented Mar 3, 2024

Let's see how this one behaves: #2619

@lehni
Copy link
Collaborator

lehni commented Mar 3, 2024

BTW, I am on an ARM system also (M3), but I'm not using docker locally since I already have a mysql and postgresql instance running globally and would have to stop them due to conflicting ports… I just run the tests in those instances, works well.

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

Successfully merging a pull request may close this issue.

2 participants