Fix Ruby in Docker container on Apple silicon #168
3 Participants
Notifications
Due Date
No due date set.
Blocks
#160 Upgrade Rails to 7.1, update dependencies, require Ruby 3.x
kosmos/akkounts
Reference: kosmos/akkounts#168
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "chore/fix_docker_ruby_on_apple_silicon"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Builds Ruby 3.3.0 from source, with the fix from https://github.com/ruby/ruby/pull/9371 applied to it.
(When using with Docker Compose, it only has to be built once, even when rebuilding other parts of the container later.)
I tried to build it but it eventually failed:
Added
pkg-config
to the apt packages. Apparently also only needed for certain architectures.Ok, that seemed to have worked:
OK, but if you daemonize it, then you won't see things in the started container working or failing, like e.g. the Ruby gem that this PR fixes.
Given that everything started successfully, you should be able to use the quick start instructions from the README, in order to set up the directory and seed the database(s). Then you could log in at http://localhost:3000.
@slvrbckt By the way, don't forget to use the actual review comment/approve function when reviewing PRs, so that you get your automatic review kredits issued later...
Yeah, I checked the logs and nothing looked bad that I noticed.
Carrying on with the instructions from the README:
However, when I go to
http://localhost:3000
I get the Kosmos login page, butadmin
pw:admin is admin
does not work.Not sure if this is relevant, or the right container to look at (I also checked the LDAP container which had nothing that looked relevant):
Hooray, almost there! Things are all working as intended now.
You have found an actual bug in the seeds, which was created by my changes to the code in the original PR, i.e. a successful review. 💪
If you pull my latest commit and run the
db:setup
again, it should work this time.@slvrbckt You could approve this PR already, because it's confirmed to do what it says. So then I can merge it, and leave the other fix for the original PR review.
Working now! 👍
I can confirm as that his fixes the segfaults for me. Thank you 🥇
I'm still seeing the directory permission errors though. When I comment out the
volumes
config on the redis service, I'm getting the same error for the volumes of the other services (ldap and minio). But when I comment out all three of them, docker starts up without any further errors.Would be interesting to know why that isn't happening for @slvrbckt on the same platform and OS (albeit probably not with the alternative Docker implementation).
The LDAP one might actually make sense to not even mount, but the minio volume is incredibly convenient for browsing data in RS accounts on the host filesystem.
@galfert Could you try and see if using named volumes fixes the issues? I just opened #171 for that.