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

Docker configuration needs changes to work on Mac (M1+) #1398

Open
cellio opened this issue Sep 9, 2024 · 2 comments · May be fixed by #1430
Open

Docker configuration needs changes to work on Mac (M1+) #1398

cellio opened this issue Sep 9, 2024 · 2 comments · May be fixed by #1430
Assignees
Labels
area: deployment Issues in setting up qpixel, containers, etc. complexity: average Not particularly hard, not particularly trivial. priority: medium type: bug Something isn't working

Comments

@cellio
Copy link
Member

cellio commented Sep 9, 2024

I tried to set up QPixel with Docker on a Mac M1 with MacOS 14.2.1 (Sonoma) and ran into many issues. With help we got it working; this issue is to track changes for both the Docker setup and our installation doc to make it easier for the next person. I was working with (and leaning heavily on) @Oaphi , who will probably have more to add to this list.

  • We had to edit Dockerfile to be more explicit about architecture, replacing # FROM ruby:3.0.0 with FROM --platform=linux/arm64 ruby:3.0.0. Dockerfile has to work for everyone so we can't edit it in the repo, but we should document this requirement in the readme file.
  • Similarly, in docker-compose.yml, in the uwsgi block, we had to add platform: linux/amd64. Again, we should document this.
  • We had to edit manifest.js to add: //= link application.css. I don't understand the failure that led to this so I don't know if this is specific to this platform, a more general problem, or a gremlin. Needs more review.
  • We had issues with mysql setup, but I don't know if they were general bugs or problems with interference from the host system. We had to drop and recreate the root@% and qpixel@% users, give root the ability to do grants, and then do the qpixel grants manually. Needs more review (or testing, if we can get a clean Mac environment to test on).
  • In the uwsgi container, we had to do dpkg --add-architecture amd64 and then manually install libc6:amd64 and g++-multilib. I think the configuration should be able to do that for us, but if not and we need to document this, the cycle is: apt install..., rake tmp:clear, rm -rf ./public/assets, rm -rf ./tmp/cache/assets, rails assets:precompile, rails restart.
@cellio cellio added type: bug Something isn't working priority: medium complexity: unassessed Needs further developer investigation before complexity/feasibility can be determined. area: deployment Issues in setting up qpixel, containers, etc. labels Sep 9, 2024
@Oaphi Oaphi added complexity: average Not particularly hard, not particularly trivial. and removed complexity: unassessed Needs further developer investigation before complexity/feasibility can be determined. labels Sep 10, 2024
@Oaphi
Copy link
Member

Oaphi commented Sep 10, 2024

Dockerfile has to work for everyone so we can't edit it in the repo

Minor nit: we can and should make those changes to the repo, they are just going to contained in a standalone Dockerfile for amd64 (a.k.a. aarch64).

@cellio
Copy link
Member Author

cellio commented Sep 10, 2024

Minor nit: we can and should make those changes to the repo, they are just going to contained in a standalone Dockerfile for amd64 (a.k.a. aarch64).

Ah! Yes, that makes sense. I meant that we couldn't make these changes in Dockerfile, because that affects everyone. I hadn't thought of a separate file. Good idea!

@Oaphi Oaphi linked a pull request Oct 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: deployment Issues in setting up qpixel, containers, etc. complexity: average Not particularly hard, not particularly trivial. priority: medium type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants