My Docker file is song/songkong at https://hub.docker.com/r/songkong/songkong/~/dockerfile/
FROM openjdk:8-jre-alpine
RUN apk --no-cache add \
ca-certificates \
curl \
fontconfig \
msttcorefonts-installer \
tini \
&& update-ms-fonts \
&& fc-cache -f
RUN mkdir -p /opt \
&& curl http://www.jthink.net/songkong/downloads/current/songkong-linux-headless-novm.tgz?val=77 | tar -C /opt -xzf - \
&& find /opt/songkong -perm /u+x -type f -print0 | xargs -0 chmod a+x
RUN addgroup -S songkong \
&& adduser -S -G songkong songkong
USER songkong:songkong
EXPOSE 4567
ENTRYPOINT ["/sbin/tini"]
# Config, License, Logs, Reports and Internal Database
VOLUME /songkong
# Music folder should be mounted here
VOLUME /music
WORKDIR /opt/songkong
CMD /opt/songkong/songkongremote8.sh
it works fine with a Synology DS218+ Disk Station (Intel)
I purchased a Qnap TS-131P to test with Qnap, but also to confirm it works with Arm processor, since Qnap supports Docker on arm processors whereas Synology does not.
When I try to start Container from the image I get an error
standard_init_linux.go:185: exec user process caused "exec format error
and this link makes me think the problem is due to the arm processor.
But I am confused since I thought the whole point of Docker was to hide these system specific details away, how (can I) fix my Docker File so it works on Qnap.
The problem was indeed that Docker image files are architecture specific (at least the default ones). So a Docker file built on Intel will only work on Intel, and a Docker file build for Arm32 will only work for Arm32.
It seems there are ways to build an Arm build on an Intel device but that would still leave you with distributing two separate images. And if you have a physical Arm device it is much easier to build an Arm image directly on an Arm device.
You also need to make sure your base image supports your architecture, but the official one have now been built as multi-arch images so this is not usually a problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With