linuxserver / docker-calibre

GNU General Public License v3.0
367 stars 64 forks source link

Docker pulls x86_64 on arm64 #76

Closed jiriks74 closed 2 years ago

jiriks74 commented 2 years ago

linuxserver.io


Expected Behavior

Docker pulling image for correct architecture (arm64)

Current Behavior

Like mentioned on your website: Simply pulling lscr.io/linuxserver/calibre should retrieve the correct image for your arch, but you can also pull specific arch images via tags. should download the correct architecture (arm64), but it pulls x86_64

Steps to Reproduce

  1. Create docker-compose.yml with template from official website:
    ---
    version: "2.1"
    services:
    calibre:
    image: lscr.io/linuxserver/calibre
    container_name: calibre
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - PASSWORD= #optional
      - CLI_ARGS= #optional
    volumes:
      - /path/to/data:/config
    ports:
      - 8080:8080
      - 8081:8081
    restart: unless-stopped
  2. Select proper patch for config volume
  3. Run docker-compose up
  4. Run docker exec -it calibre /bin/bash
  5. Run uname -a

Environment

OS: Raspberry Pi OS 64bit CPU architecture: arm64 How docker service was installed: official docker image

Command used to create docker container (run/create/compose/screenshot)

docker-compose up with template docker-compose.yml with only password enabled and config directory path changed

---
version: "2.1"
services:
  calibre:
    image: lscr.io/linuxserver/calibre
    container_name: calibre
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Prague
      - PASSWORD=myPassword
      - CLI_ARGS= #optional
    volumes:
      - /var/www/calibre:/config
    ports:
      - 8080:8080
      - 8081:8081
    restart: unless-stopped
github-actions[bot] commented 2 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

thelamer commented 2 years ago

Not in this case the tags are in the next sentence.

jiriks74 commented 2 years ago

Not in this case the tags are in the next sentence.

I used the tag successfuly.

Can you please change the wording your site and README in that case? It's misleading. I ran the container wondering why was it so slow without realizing it could pull wrong architecture as it said it will do it automatically.

thelamer commented 2 years ago

While I understand your confusion, please understand it is slightly more complex than that. Many of our blurbs in our readmes are standardized because everything is templated. IE the line in question: https://github.com/linuxserver/docker-jenkins-builder/blob/master/roles/generate-jenkins/templates/README.j2#L67

We specifically select language like should here, and literally in the next section explain the tags to use and what the arch tag is and why it exists.

It is not just a matter of changing this in the readme it is a matter of templating out a specific corner case for this container, which I personally feel the documentation is adequate to get users up and running.

jiriks74 commented 2 years ago

Yes, it explains that. The problem is that it says that I don't need to care about it: pullinglscr.io/{{ lsio_project_name_short }}/{{ project_name }}should retrieve the correct image for your arch With that wording I assume that it will choose the image automatically and then it says that I can pull a specific arch, not have to.

If it's a template, does it work with other containers? And why doesn't it with this one? If you build an image with something like this: --platform linux/arm/v7 for each architecture it should work automatically without problems.

Sorry, I'd just like to know, why it isn't possible to fix.

Roxedus commented 2 years ago

If it's a template, does it work with other containers? And why doesn't it with this one?

This master branch does not support multiarch, the arch branch does, unlike any of our other 180 or so containers that does not have this mix. IIRC master branch has to be set to be multiarch in order for the arch branch to be built as multiarch.

The wording of the mentioned section is revised and will be easier to read soon.

jiriks74 commented 2 years ago

Thank you for clearing that out for me and for your help.