orthanc-server / orthanc-builder

Repo used to build osimis/orthanc docker images, windows installers and OSX packages
GNU Affero General Public License v3.0
26 stars 12 forks source link

linux docker image not starts on ZFS storage at Proxmox LXC #8

Closed Kramtoske closed 1 week ago

Kramtoske commented 1 year ago

Docker runs on ZFS backing filesystem type

Storage Driver: overlay2
  Backing Filesystem: zfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: false
  userxattr: true

when trying to run image we are getting error docker: failed to register layer: ApplyLayer exit status 1 stdout: stderr: unlinkat /usr/share/build-essential: invalid argument.

when storage type

Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: false
  userxattr: true

image starts without issues

how to run it on zfs ?

amazy commented 1 year ago

@Kramtoske could you provide the command line or compose file you use to start Orthanc ?

Kramtoske commented 1 year ago

@amazy simple docker run osimis/orthanc:23.4.0 works on extfs but not on zfs

amazy commented 1 year ago

Thanks.

Note that we currently have no experience and no system with ZFS and this might take quite some time before we can reproduce, analyze and fix the issue.

@Kramtoske , can you try to run the base image ?

docker run -it osimis/orthanc-runner-base:bullseye-20230320-slim-stable bash

You should have the same error since the /usr/share/build-essential folder should be there as well.

From that point, with your experience, you might be able to suggest a patch to this dockerfile

Thanks in advance for your help

Alain.

Kramtoske commented 1 year ago

@amazy docker run -it osimis/orthanc-runner-base:bullseye-20230320-slim-stable bash started up without any error

same issue found there https://github.com/nextcloud/all-in-one/discussions/1490#discussioncomment-5341556 when image created not on lxc it created UIDs out of allowed ranges for lxc, when docker created in lxc it defines uid/gid in scope. https://kcore.org/2022/02/05/lxc-subuid-subgid/

amazy commented 1 year ago

As I understand it (but honestly, I don't understand much about it), there's nothing to do on our side but wait for a Docker patch or ask the user to remap ids. Is that correct ?

Kramtoske commented 1 year ago

there's theoretical chance that setting user would help for example what we used on meddream and not met issues on any platform where we ran docker image

ENV SERVICE_USER="meddream"
ENV SERVICE_USER_ID="10001"
ENV SERVICE_GROUP="meddream"
ENV SERVICE_GROUP_ID="10001"

RUN groupadd -r -g $SERVICE_GROUP_ID $SERVICE_GROUP \ 
    && useradd -r $SERVICE_USER -u $SERVICE_USER_ID -g $SERVICE_GROUP_ID \
    && chown -R $SERVICE_USER:$SERVICE_GROUP /opt/meddream \

WORKDIR /opt/meddream/
USER $SERVICE_USER
amazy commented 1 year ago

@Kramtoske Could you try to do that in an image that you build and that derives from osimis/orthanc:23.4.0 ?

amazy commented 1 week ago

Closing issue due to inactivity