Entwicklungsumgebung (Docker) startet für Mac M1 Geräte nicht
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, docker-compose, rails
- Domain
- developer-experience, devops, infrastructure
Research direction
Start by reproducing the reported failures from the local Docker Compose configuration, focusing on the Sphinx container crash and the Rails inotify error. Inspect the referenced docker services and docker/rails.dockerfile, then verify that the development environment starts on Mac M1 without the reported failures and that Rails and Sphinx remain usable.
Written by the indexing model from the issue text.
Description
Hoi zäme
Evtl. stehe ich etwas auf dem Schlauch, aber gibt es eine Möglichkeit HitoBito auf Macbooks mit einem M1 Prozessor zu entwickeln? Ich habe als einzige Änderung bei den container/services die Platform auf linux/x86_64 gesetzt, damit das System überhaupt startet.
Lokales Docker-Compose:
version: '3.4'
services:
rails: &rails
platform: linux/x86_64
build:
context: ./docker
dockerfile: rails.dockerfile
image: ghcr.io/hitobito/development/rails
user: "${RAILS_UID:-1000}"
tty: true
stdin_open: true
depends_on:
- db
- mailcatcher
- cache
- webpack
env_file: docker/rails.env
environment:
WEBPACKER_DEV_SERVER_HOST: webpack
ports:
- "3000:3000"
volumes:
- ./app/:/usr/src/app
- hitobito_bundle:/opt/bundle
- seed:/seed
- ./docker/home/rails:/home/developer
- /tmp/.X11-unix:/tmp/.X11-unix
- ./docker/rails/work_around_docker_fs_bug.rb:/usr/src/app/hitobito/config/initializers/work_around_docker_fs_bug.rb:ro
# `exec` into this to execute the tests of the core
rails_test_core:
<<: *rails
command: [ 'sleep', 'infinity' ]
ports: []
platform: linux/x86_64
environment:
WAGONS: ''
RAILS_ENV: test
RAILS_TEST_DB_NAME: "hitobito_test_core"
WEBPACKER_DEV_SERVER_HOST: null
RAILS_SPHINX_HOST: null
SKIP_SEEDS: 1
SKIP_BUNDLE_INSTALL: 1
depends_on:
- db
worker:
<<: *rails
command: [ 'rails', 'jobs:work' ]
ports: []
platform: linux/x86_64
environment:
SKIP_RAILS_MIGRATIONS: 1
SKIP_SEEDS: 1
SKIP_BUNDLE_INSTALL: 1
depends_on:
- rails
- db
- mailcatcher
- cache
# Dependencies
mailcatcher:
platform: linux/x86_64
image: ghcr.io/hitobito/development/mailcatcher
build:
context: ./docker
dockerfile: mailcatcher.dockerfile
ports:
- "1080:1080"
cache:
image: memcached:1.6-alpine
command: [ memcached, -l, '0.0.0.0', -p, '11211' ]
sphinx:
image: macbre/sphinxsearch:3.1.1
platform: linux/x86_64
command: sphinx-start
depends_on:
- db
volumes:
- ./docker/sphinx.conf:/opt/sphinx/conf/sphinx.conf:ro
- ./docker/sphinx-start:/usr/local/bin/sphinx-start:ro
- ./docker/sphinx-indexer:/usr/local/bin/sphinx-indexer:ro
- sphinx_indexes:/opt/sphinx/indexes
db:
image: mysql:5.7
platform: linux/x86_64
command:
- --sort_buffer_size=2M
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
env_file: ./docker/mysql.env
ports:
- "33066:3306"
volumes:
- ./docker/mysql-setup.sql:/docker-entrypoint-initdb.d/mysql-setup.sql:ro
- ./docker/test-setup.sql:/docker-entrypoint-initdb.d/test-setup.sql:ro
- db:/var/lib/mysql
webpack:
build:
context: ./docker
dockerfile: rails.dockerfile
image: ghcr.io/hitobito/development/rails
platform: linux/x86_64
entrypoint: [ "webpack-entrypoint" ]
env_file: docker/rails.env
environment:
WEBPACKER_DEV_SERVER_HOST: webpack
SKIP_BUNDLE_INSTALL: 1
user: "${RAILS_UID:-1000}"
command: /usr/src/app/hitobito/bin/webpack-dev-server
ports:
- "3035:3035"
volumes:
- ./app/:/usr/src/app
- hitobito_bundle:/opt/bundle
- hitobito_yarn_cache:/home/developer/.cache/yarn
volumes:
db:
seed:
hitobito_bundle:
external: true
hitobito_yarn_cache:
external: true
sphinx_indexes:
Ich kriege das Docker-Compose nicht zum laufen.
Beim Sphinx Container kriege ich folgende Error-Meldung:
cevi-sphinx-1 | Host OS is Linux alpine38 4.14.69-0-vanilla #1-Alpine SMP Mon Sep 10 19:33:23 UTC 2018 x86_64 Linux
cevi-sphinx-1 | Stack bottom = 0x4001ffacd7, thread stack size = 0x20000
cevi-sphinx-1 | Trying manual backtrace:
cevi-sphinx-1 | Something wrong with thread stack, manual backtrace may be incorrect (fp=0x5)
cevi-sphinx-1 | Wrong stack limit or frame pointer, manual backtrace failed (fp=0x5, stack=0x4002000000, stacksize=0x20000)
cevi-sphinx-1 | -------------- backtrace ends here ---------------
cevi-sphinx-1 | Please, create a bug report in our bug tracker (http://sphinxsearch.com/bugs) and attach there:
cevi-sphinx-1 | a) searchd log, b) searchd binary, c) searchd symbols.
cevi-sphinx-1 | Look into the chapter 'Reporting bugs' in the documentation
cevi-sphinx-1 | (/usr/share/doc/sphinx/sphinx.txt or http://sphinxsearch.com/docs/current.html#reporting-bugs)
cevi-sphinx-1 | --- BT to source lines (depth 0): ---
cevi-sphinx-1 | conversion failed (error 'No such file or directory'):
cevi-sphinx-1 | 1. Run the command provided below over the crashed binary (for example, 'searchd'):
cevi-sphinx-1 | 2. Attach the source.txt to the bug report.
cevi-sphinx-1 | addr2line -e searchd > source.txt
cevi-sphinx-1 | --- BT to source lines finished ---
cevi-sphinx-1 | --- 0 active threads ---
cevi-sphinx-1 | ------- CRASH DUMP END -------
cevi-worker-1 | ⚙ Activating Wagonfile.development
Beim Rails Container kriege ich diese Meldung:
cevi-rails-1 | Creating scope :without_deleted. Overwriting existing method Role.without_deleted.
cevi-rails-1 | Creating scope :with_deleted. Overwriting existing method Role.with_deleted.
cevi-rails-1 | Creating scope :only_deleted. Overwriting existing method Role.only_deleted.
cevi-rails-1 | /usr/src/app/hitobito_cevi/lib/hitobito_cevi/wagon.rb:49: warning: already initialized constant AbilityDsl::UserContext::LAYER_PERMISSIONS
cevi-rails-1 | /usr/src/app/hitobito/app/abilities/ability_dsl/user_context.rb:16: warning: previous definition of LAYER_PERMISSIONS was here
cevi-rails-1 | /usr/src/app/hitobito_cevi/lib/hitobito_cevi/wagon.rb:50: warning: already initialized constant AbilityDsl::UserContext::GROUP_PERMISSIONS
cevi-rails-1 | /usr/src/app/hitobito/app/abilities/ability_dsl/user_context.rb:12: warning: previous definition of GROUP_PERMISSIONS was here
cevi-rails-1 | /usr/src/app/hitobito_cevi/lib/hitobito_cevi/wagon.rb:58: warning: already initialized constant Export::Tabular::Groups::List::EXCLUDED_ATTRS
cevi-rails-1 | /usr/src/app/hitobito/app/domain/export/tabular/groups/list.rb:11: warning: previous definition of EXCLUDED_ATTRS was here
cevi-rails-1 | Function not implemented - Failed to initialize inotify excluded from capture: DSN not set
cevi-rails-1 | rails aborted!
cevi-rails-1 | Errno::ENOSYS: Function not implemented - Failed to initialize inotify
cevi-rails-1 | /usr/src/app/hitobito/config/environment.rb:5:in `<main>'
cevi-rails-1 | Tasks: TOP => db:migrate => db:load_config => environment
cevi-rails-1 | (See full trace by running task with --trace)
cevi-rails-1 exited with code 1
Hat das überhaupt was mit m1 oder mac zu tun, oder eher nicht?
- Dominant language
- Shell
- Stars
- 23
- Forks
- 18
- Avg merge
- 1h 28m
- Merged PRs (30d)
- 1
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hitobito/development
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
hitobito/development#83 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 30/100
hitobito/development#74 · 1 comment ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
hitobito/development#72 · 2 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
hitobito/development#23 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
hitobito/development#15 ·
All issues in hitobito/development
Similar issues
-
bot-found documentation priority: P3
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
madenvel/KalinkaPlayer#602 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
huggingface/kernels#1006 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
Maintainers usually reply within 2 days
-
severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
luainkernel/lunatik#2594 ·
Maintainers usually reply within 1 day