solidnerd / docker-bookstack

BookStack in a container
MIT License
461 stars 196 forks source link

Raspberry Pi4 support? #411

Closed igorkis-scrts closed 1 year ago

igorkis-scrts commented 1 year ago

Hello! Seems that there were at least semi-successful attempts to run Bookstack Docker container on Pi in the past, but I'm interested if it's possible to run current 23.06 version on Pi. I'm getting the expected error

no matching manifest for linux/arm64/v8 in the manifest list entries

Is it possible change Dockerfile to obtain support of Arm64/v8? Seems that bookworm has arm64 version at very least, but changing it doesn't resolve this issue.

UPDATE Here's what I came up with:

version: '3'

networks:
  bookstack_nw:
    external: false

volumes:
  uploads:
  storage-uploads:

services:
  bookstack:
    image: solidnerd/bookstack:23.6.0-1
    container_name: bookstack
    restart: unless-stopped
    environment:
    - DB_HOST=mysql:3306
    - DB_DATABASE=bookstack
    - DB_USERNAME=bookstack
    - DB_PASSWORD=secret
    #set the APP_ to the URL of bookstack without without a trailing slash APP_URL=https://example.com
    - APP_URL=https://my.url.me
    networks:
      - bookstack_nw
    volumes:
    - uploads:/var/www/bookstack/public/uploads
    - storage-uploads:/var/www/bookstack/storage/uploads
    ports:
    - "8080:8080"
    build:
      context: .
      dockerfile: ./Dockerfile
    depends_on:
      - mysql
  mysql:
    image: mysql:8
    restart: unless-stopped
    environment:
    - MYSQL_ROOT_PASSWORD=secret
    - MYSQL_DATABASE=bookstack
    - MYSQL_USER=bookstack
    - MYSQL_PASSWORD=secret
    networks:
      - bookstack_nw
    volumes:
      - ./mysql:/var/lib/mysql

Also, I changed alpine to latest and amd64->arm64. Docker-compose seems to be working, but I have no luck in connecting to self-hosted website neither by IP nor by domain name. It seems that server still receives requests, but website still can't be accessed - DNS_PROBY_FINISHED_NXDOMAIN error on both Pi and other PC in local network. It seems that it can't resolve domain name.

Generating Key...
base64:actual_key_here
Starting Migration...
   INFO  Preparing database.  
  Creating migration table ......................................... 54ms DONE
   INFO  Running migrations.  
  2014_10_12_000000_create_users_table ............................ 285ms DONE
  2014_10_12_100000_create_password_resets_table .................. 119ms DONE
  2015_07_12_114933_create_books_table ............................. 41ms DONE
  2015_07_12_190027_create_pages_table ............................. 53ms DONE
  2015_07_13_172121_create_images_table ............................ 35ms DONE
  2015_07_27_172342_create_chapters_table .......................... 34ms DONE
  2015_08_08_200447_add_users_to_entities ......................... 128ms DONE
  2015_08_09_093534_create_page_revisions_table .................... 52ms DONE
  2015_08_16_142133_create_activities_table ........................ 38ms DONE
  2015_08_29_105422_add_roles_and_permissions ................... 2,168ms DONE
  2015_08_30_125859_create_settings_table .......................... 92ms DONE
  2015_08_31_175240_add_search_indexes .............................. 0ms DONE
  2015_09_04_165821_create_social_accounts_table .................. 112ms DONE
  2015_09_05_164707_add_email_confirmation_table .................. 141ms DONE
  2015_11_21_145609_create_views_table ............................. 36ms DONE
  2015_11_26_221857_add_entity_indexes ............................ 737ms DONE
  2015_12_05_145049_fulltext_weighting .............................. 0ms DONE
  2015_12_07_195238_add_image_upload_types ......................... 90ms DONE
  2015_12_09_195748_add_user_avatars ............................... 38ms DONE
  2016_01_11_210908_add_external_auth_to_users ..................... 94ms DONE
  2016_02_25_184030_add_slug_to_revisions ......................... 101ms DONE
  2016_02_27_120329_update_permissions_and_roles .................. 479ms DONE
  2016_02_28_084200_add_entity_access_controls .................. 1,231ms DONE
  2016_03_09_203143_add_page_revision_types ........................ 70ms DONE
  2016_03_13_082138_add_page_drafts ................................ 84ms DONE
  2016_03_25_123157_add_markdown_support ........................... 81ms DONE
  2016_04_09_100730_add_view_permissions_to_roles ................. 149ms DONE
  2016_04_20_192649_create_joint_permissions_table ................ 579ms DONE
  2016_05_06_185215_create_tags_table ............................. 179ms DONE
  2016_07_07_181521_add_summary_to_page_revisions .................. 41ms DONE
  2016_09_29_101449_remove_hidden_roles ........................... 238ms DONE
  2016_10_09_142037_create_attachments_table ...................... 148ms DONE
  2017_01_21_163556_create_cache_table ............................. 96ms DONE
  2017_01_21_163602_create_sessions_table ......................... 136ms DONE
  2017_03_19_091553_create_search_index_table ..................... 299ms DONE
  2017_04_20_185112_add_revision_counts ........................... 128ms DONE
  2017_07_02_152834_update_db_encoding_to_ut8mb4 .................... 0ms DONE
  2017_08_01_130541_create_comments_table ......................... 195ms DONE
  2017_08_29_102650_add_cover_image_display ........................ 40ms DONE
  2018_07_15_173514_add_role_external_auth_id ..................... 117ms DONE
  2018_08_04_115700_create_bookshelves_table .................... 2,221ms DONE
  2019_07_07_112515_add_template_support .......................... 104ms DONE
  2019_08_17_140214_add_user_invites_table ........................ 105ms DONE
  2019_12_29_120917_add_api_auth .................................. 172ms DONE
  2020_08_04_111754_drop_joint_permissions_id ..................... 230ms DONE
  2020_08_04_131052_remove_role_name_field ......................... 99ms DONE
  2020_09_19_094251_add_activity_indexes ........................... 73ms DONE
  2020_09_27_210059_add_entity_soft_deletes ....................... 191ms DONE
  2020_09_27_210528_create_deletions_table ........................ 152ms DONE
  2020_11_07_232321_simplify_activities_table ..................... 368ms DONE
  2020_12_30_173528_add_owned_by_field_to_entities .............. 1,222ms DONE
  2021_01_30_225441_add_settings_type_column ....................... 26ms DONE
  2021_03_08_215138_add_user_slug ................................. 123ms DONE
  2021_05_15_173110_create_favourites_table ....................... 134ms DONE
  2021_06_30_173111_create_mfa_values_table ....................... 108ms DONE
  2021_07_03_085038_add_mfa_enforced_to_roles_table ................ 46ms DONE
  2021_08_28_161743_add_export_role_permission ..................... 15ms DONE
  2021_09_26_044614_add_activities_ip_column ....................... 35ms DONE
  2021_11_26_070438_add_index_for_user_ip .......................... 39ms DONE
  2021_12_07_111343_create_webhooks_table ......................... 236ms DONE
  2021_12_13_152024_create_jobs_table .............................. 75ms DONE
  2021_12_13_152120_create_failed_jobs_table ....................... 70ms DONE
  2022_01_03_154041_add_webhooks_timeout_error_columns ............. 34ms DONE
  2022_04_17_101741_add_editor_change_field_and_permission ......... 75ms DONE
  2022_04_25_140741_update_polymorphic_types ....................... 53ms DONE
  2022_07_16_170051_drop_joint_permission_type .................... 372ms DONE
  2022_08_17_092941_create_references_table ....................... 266ms DONE
  2022_09_02_082910_fix_shelf_cover_image_types ..................... 3ms DONE
  2022_10_07_091406_flatten_entity_permissions_table .............. 169ms DONE
  2022_10_08_104202_drop_entity_restricted_field ................ 1,650ms DONE
  2023_01_24_104625_refactor_joint_permissions_storage ............ 428ms DONE
  2023_01_28_141230_copy_color_settings_for_dark_mode ............... 3ms DONE
  2023_02_20_093655_increase_attachments_path_length ............... 99ms DONE
  2023_02_23_200227_add_updated_at_index_to_pages .................. 52ms DONE
  2023_06_10_071823_remove_guest_user_secondary_roles ............... 9ms DONE
  2023_06_25_181952_remove_bookshelf_create_entity_permissions ...... 2ms DONE
Clearing caches...
   INFO  Application cache cleared successfully.  
   INFO  Compiled views cleared successfully.  
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.30.0.3. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.30.0.3. Set the 'ServerName' directive globally to suppress this message
[Tue Jul 04 18:46:47.940264 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.57 (Debian) PHP/8.2.7 configured -- resuming normal operations
[Tue Jul 04 18:46:47.940406 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
bookstack:80 172.30.0.1 - - [04/Jul/2023:18:47:41 +0000] "GET / HTTP/1.1" 302 1872 "-" "Mozilla/5.0 (X11; CrOS aarch64 13597.84.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5672.95 Safari/537.36"
bookstack:80 172.30.0.1 - - [04/Jul/2023:18:48:41 +0000] "GET / HTTP/1.1" 302 1872 "-" "Mozilla/5.0 (X11; CrOS aarch64 13597.84.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5672.95 Safari/537.36"
igorkis-scrts commented 1 year ago

Solved my issue - changed URL to IP address and it worked flawlessly.