realies / soulseek-docker

🐳 Soulseek Docker Container
https://hub.docker.com/r/realies/soulseek/
MIT License
209 stars 35 forks source link

Problem building in a Mac M1 #85

Closed jcornide closed 6 months ago

jcornide commented 6 months ago

Hi,

I tried to use this in a M1 Mac Pro but I get this error: failed to solve: process "/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y binutils ca-certificates curl dbus fonts-noto-cjk locales openbox patch supervisor tigervnc-standalone-server tigervnc-tools tzdata --no-install-recommends && dbus-uuidgen > /etc/machine-id && locale-gen en_US.UTF-8 && mkdir /usr/share/novnc && curl -fL# https://github.com/novnc/noVNC/archive/master.tar.gz -o /tmp/novnc.tar.gz && tar -xf /tmp/novnc.tar.gz --strip-components=1 -C /usr/share/novnc && mkdir /usr/share/novnc/utils/websockify && curl -fL# https://github.com/novnc/websockify/archive/master.tar.gz -o /tmp/websockify.tar.gz && tar -xf /tmp/websockify.tar.gz --strip-components=1 -C /usr/share/novnc/utils/websockify && curl -fL# https://site-assets.fontawesome.com/releases/v6.0.0/svgs/solid/cloud-arrow-down.svg -o /usr/share/novnc/app/images/downloads.svg && curl -fL# https://site-assets.fontawesome.com/releases/v6.0.0/svgs/solid/folder-music.svg -o /usr/share/novnc/app/images/shared.svg && curl -fL# https://site-assets.fontawesome.com/releases/v6.0.0/svgs/solid/comments.svg -o /usr/share/novnc/app/images/logs.svg && bash -c 'sed -i \"s/<path/<path style=\\\"fill:white\\\"/\" /usr/share/novnc/app/images/{downloads,logs,shared}.svg' && patch /usr/share/novnc/vnc.html < /tmp/ui.patch && sed -i 's/10px 0 5px/8px 0 6px/' /usr/share/novnc/app/styles/base.css && ln -s /app/soulseek.png /usr/share/novnc/app/images/soulseek.png && ln -s /data/Soulseek\\ Downloads /usr/share/novnc/downloads && ln -s /data/Soulseek\\ Shared\\ Folder /usr/share/novnc/shared && ln -s /data/Soulseek\\ Chat\\ Logs /usr/share/novnc/logs && curl -fL# https://www.slsknet.org/SoulseekQt/Linux/SoulseekQt-2018-1-30-64bit-appimage.tgz -o /tmp/soulseek.tgz && tar -xvzf /tmp/soulseek.tgz -C /tmp && /tmp/SoulseekQt-2018-1-30-64bit.AppImage --appimage-extract && mv /squashfs-root /app && strip /app/SoulseekQt && useradd -u 1000 -U -d /data -s /bin/false soulseek && usermod -G users soulseek && mkdir /data && apt-get purge -y binutils curl dbus patch && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" did not complete successfully: exit code: 126

realies commented 6 months ago

hi, emulate it as amd64, there's no native arm64 client

jcornide commented 6 months ago

Thanks for the fast reply ❤️ Tried that this way:

version: '2'
services:
  soulseek:
    platform: linux/amd64
    build: .
    environment:
      - pgid=1000
      - puid=1000
      - resize=scale
      - resolution=1280x720
    ports:
      - 6080:6080
    volumes:
      - ./appdata:/data/.SoulseekQt
      - ./downloads:/data/Soulseek Downloads
      - ./logs:/data/Soulseek Chat Logs
volumes:
  appdata:
  downloads:
  logs:

I got the error in the same command but different exit code: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y binutils ca-certificates curl dbus libssl1.0-dev locales openbox patch supervisor x11vnc xvfb python3 --no-install-recommends && dbus-uuidgen > /etc/machine-id && locale-gen en_US.UTF-8 && mkdir /usr/share/novnc && curl -fL# https://github.com/novnc/noVNC/archive/master.tar.gz -o /tmp/novnc.tar.gz && tar -xf /tmp/novnc.tar.gz --strip-components=1 -C /usr/share/novnc && mkdir /usr/share/novnc/utils/websockify && curl -fL# https://github.com/novnc/websockify/archive/master.tar.gz -o /tmp/websockify.tar.gz && tar -xf /tmp/websockify.tar.gz --strip-components=1 -C /usr/share/novnc/utils/websockify && curl -fL# https://use.fontawesome.com/releases/v5.12.0/svgs/solid/cloud-download-alt.svg -o /usr/share/novnc/app/images/downloads.svg && curl -fL# https://use.fontawesome.com/releases/v5.12.0/svgs/solid/comments.svg -o /usr/share/novnc/app/images/logs.svg && bash -c 'sed -i \"s/<path/<path style=\\\"fill:white\\\"/\" /usr/share/novnc/app/images/{downloads,logs}.svg' && patch /usr/share/novnc/vnc.html < /tmp/ui.patch && sed -i 's/10px 0 5px/8px 0 6px/' /usr/share/novnc/app/styles/base.css && ln -s /app/soulseek.png /usr/share/novnc/app/images/soulseek.png && ln -s /data/Soulseek\\ Chat\\ Logs /usr/share/novnc/logs && ln -s /data/Soulseek\\ Downloads /usr/share/novnc/downloads && curl -fL# https://www.slsknet.org/SoulseekQt/Linux/SoulseekQt-2018-1-30-64bit-appimage.tgz -o /tmp/soulseek.tgz && tar -xvzf /tmp/soulseek.tgz -C /tmp && /tmp/SoulseekQt-2018-1-30-64bit.AppImage --appimage-extract && mv /squashfs-root /app && strip /app/SoulseekQt && useradd -u 1000 -U -d /data -s /bin/false soulseek && usermod -G users soulseek && mkdir /data && apt-get purge -y binutils curl dbus patch && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" did not complete successfully: exit code: 2

realies commented 6 months ago

i think you might have to instruct buildx to use the amd64 platform as a separate cli call

jcornide commented 6 months ago

mmm that goes way beyond my docker knowledge

realies commented 6 months ago

it seems like another bug on docker for macos, i was able to build thins before with a command like:

DOCKER_DEFAULT_PLATFORM=linux/amd64 DOCKER_BUILDKIT=0 docker build-t soulseek .

but now it fails at

152.5 /tmp/SoulseekQt-2018-1-30-64bit.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=d4b0eeecada37bbc753023885a3f0f7e3bdac6cc, stripped
152.5 /bin/sh: 1: /tmp/SoulseekQt-2018-1-30-64bit.AppImage: Exec format error

it's weird because the environment is supposed to be amd64, but it can't run that executable; it builds fine on a amd64 platform though

jcornide commented 6 months ago

Yes, I used this on a linux host and it worked great, it's a shame it can not run in mac os

realies commented 6 months ago

feel free to update the issue if you find a way around this docker bug ps: there's a native macos client if that's what you're after