waschinski / photo-stream

Self-hosted, super simple photo stream
https://github.com/waschinski/photo-stream
MIT License
449 stars 70 forks source link

Error building on a Raspberry Pi using Docker #30

Closed oliverhihn closed 2 years ago

oliverhihn commented 2 years ago

I try to build this project by following the README. First I pulled the repo and changed the docker-compose.yml according to the instructions provided by the README.md.

After the build finished without error, I tried to deploy the container using docker-compose up -d

Error I get:

Step 6/10 : COPY ./ /photo-stream
 ---> 67abb44bda60
Step 7/10 : WORKDIR /photo-stream
 ---> [Warning] The requested image's platform (linux/arm) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
 ---> Running in 52c90a63e1ab
Removing intermediate container 52c90a63e1ab
 ---> 7f2f829b64f2
Step 8/10 : RUN ruby -v && gem install bundler jekyll &&    bundle config --local build.sassc --disable-march-tune-native &&    bundle install
 ---> [Warning] The requested image's platform (linux/arm) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
 ---> Running in ff1d41042927
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [arm-linux-musleabihf]
Successfully installed bundler-2.3.17
Successfully installed unicode-display_width-1.8.0
Successfully installed terminal-table-2.0.0
Successfully installed safe_yaml-1.0.5
Successfully installed rouge-3.29.0
Successfully installed forwardable-extended-2.6.0
Successfully installed pathutil-0.16.2
Successfully installed mercenary-0.4.0
Successfully installed liquid-4.0.3
Successfully installed kramdown-2.4.0
Successfully installed kramdown-parser-gfm-1.1.0
Building native extensions. This could take a while...
Successfully installed ffi-1.15.5
Successfully installed rb-inotify-0.10.1
Successfully installed rb-fsevent-0.11.1
Successfully installed listen-3.7.1
Successfully installed jekyll-watch-2.2.1
Building native extensions. This could take a while...
Successfully installed sassc-2.4.0
Successfully installed jekyll-sass-converter-2.2.0
Successfully installed concurrent-ruby-1.1.10
Successfully installed i18n-1.10.0
Building native extensions. This could take a while...
Successfully installed http_parser.rb-0.8.0
Building native extensions. This could take a while...
Successfully installed eventmachine-1.2.7
Successfully installed em-websocket-0.5.3
Successfully installed colorator-1.1.0
Successfully installed public_suffix-4.0.7
Successfully installed addressable-2.8.0
Successfully installed jekyll-4.2.2
27 gems installed
Your Ruby version is 3.0.1, but your Gemfile specified ~> 3.1.2
ERROR: Service 'photo-stream' failed to build: The command '/bin/sh -c ruby -v && gem install bundler jekyll &&    bundle config --local build.sassc --disable-march-tune-native &&    bundle install' returned a non-zero code: 18

OS Info:

OS: Debian GNU/Linux 11 (bullseye) aarch64
Host: Raspberry Pi 4 Model B Rev 1.2
Kernel: 5.15.32-v8+

docker-compose version output:

docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.9.2
OpenSSL version: OpenSSL 1.1.1n  15 Mar 2022

docker version output:

Client: Docker Engine - Community
 Version:           20.10.17
 API version:       1.41
 Go version:        go1.17.11
 Git commit:        100c701
 Built:             Mon Jun  6 23:02:34 2022
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.17
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.11
  Git commit:       a89b842
  Built:            Mon Jun  6 23:01:01 2022
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.6
  GitCommit:        10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
 runc:
  Version:          1.1.2
  GitCommit:        v1.1.2-0-ga916309
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
boerniee commented 2 years ago

Hello, recently the ruby version for the Docker image was updated to 3.1.2. But the ARM build uses another base image for building the image. As the version for the ARM base image was not adapted in the docker-compose file, you have used an old version of ruby image which has caused the version mismatch error. I have adapted the version in the docker-compose file and if you pull the newest commit, you should be able to build the image. :)