From a8f15fc9af6922a6f8c4a59ab164d44c0521e548 Mon Sep 17 00:00:00 2001 From: thelamer Date: Mon, 3 Jun 2019 14:34:07 -0700 Subject: [PATCH] update env vars for bin to run properly and use embies baked in ca cert --- Dockerfile | 10 +++------- Dockerfile.aarch64 | 15 +++++---------- Dockerfile.armhf | 11 +++-------- root/etc/services.d/emby/run | 9 +++++++++ 4 files changed, 20 insertions(+), 25 deletions(-) diff --git a/Dockerfile b/Dockerfile index 402d221..b530fdb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN \ mkdir -p \ /app/emby && \ if [ -z ${EMBY_RELEASE+x} ]; then \ - EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \ + EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \ | jq -r '. | .tag_name'); \ fi && \ curl -o \ @@ -29,7 +29,8 @@ RUN \ /tmp/opt/emby-server/system/* \ /tmp/opt/emby-server/lib/samba/* \ /tmp/opt/emby-server/lib/* \ - /tmp/opt/emby-server/bin/ff* + /tmp/opt/emby-server/bin/ff* \ + /tmp/opt/emby-server/etc # runtime stage FROM lsiobase/ubuntu:bionic @@ -47,11 +48,6 @@ ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" COPY --from=buildstage /app/emby /app/emby COPY root/ / -# lib setup -RUN \ - echo "/app/emby" > /etc/ld.so.conf.d/emby.conf && \ - ldconfig - # ports and volumes EXPOSE 8096 8920 VOLUME /config /transcode diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index c29a360..101b524 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,4 @@ -FROM lsiobase/ubuntu:arm64v8-bionic as buildstage +FROM lsiobase/ubuntu:bionic as buildstage # build args ARG EMBY_RELEASE @@ -15,7 +15,7 @@ RUN \ mkdir -p \ /app/emby && \ if [ -z ${EMBY_RELEASE+x} ]; then \ - EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \ + EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \ | jq -r '. | .tag_name'); \ fi && \ curl -o \ @@ -29,10 +29,11 @@ RUN \ /tmp/opt/emby-server/system/* \ /tmp/opt/emby-server/lib/samba/* \ /tmp/opt/emby-server/lib/* \ - /tmp/opt/emby-server/bin/ff* + /tmp/opt/emby-server/bin/ff* \ + /tmp/opt/emby-server/etc # runtime stage -FROM lsiobase/ubuntu:arm64v8-bionic +FROM lsiobase/ubuntu:bionic # set version label ARG BUILD_DATE @@ -47,12 +48,6 @@ ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" COPY --from=buildstage /app/emby /app/emby COPY root/ / -# lib setup -RUN \ - echo "**** add lib path ****" && \ - echo "/app/emby" > /etc/ld.so.conf.d/emby.conf && \ - ldconfig - # ports and volumes EXPOSE 8096 8920 VOLUME /config /transcode diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 0e63e9e..f0531e8 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -15,7 +15,7 @@ RUN \ mkdir -p \ /app/emby && \ if [ -z ${EMBY_RELEASE+x} ]; then \ - EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \ + EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \ | jq -r '. | .tag_name'); \ fi && \ curl -o \ @@ -29,7 +29,8 @@ RUN \ /tmp/opt/emby-server/system/* \ /tmp/opt/emby-server/lib/samba/* \ /tmp/opt/emby-server/lib/* \ - /tmp/opt/emby-server/bin/ff* + /tmp/opt/emby-server/bin/ff* \ + /tmp/opt/emby-server/etc # runtime stage FROM lsiobase/ubuntu:arm32v7-bionic @@ -47,12 +48,6 @@ ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" COPY --from=buildstage /app/emby /app/emby COPY root/ / -# lib setup -RUN \ - echo "**** add lib path ****" && \ - echo "/app/emby" > /etc/ld.so.conf.d/emby.conf && \ - ldconfig - # ports and volumes EXPOSE 8096 8920 VOLUME /config /transcode diff --git a/root/etc/services.d/emby/run b/root/etc/services.d/emby/run index 00c5c3a..ad2857c 100644 --- a/root/etc/services.d/emby/run +++ b/root/etc/services.d/emby/run @@ -1,5 +1,14 @@ #!/usr/bin/with-contenv bash +# env settings +APP_DIR="/app/emby" +export LD_LIBRARY_PATH="${APP_DIR}" +export FONTCONFIG_PATH="${APP_DIR}"/etc/fonts +if [ -d "/lib/x86_64-linux-gnu" ]; then + export LIBVA_DRIVERS_PATH="${APP_DIR}":/usr/lib/x86_64-linux-gnu/dri:/usr/lib64/dri:/usr/lib/dri +fi +export SSL_CERT_FILE="${APP_DIR}"/etc/ssl/certs/ca-certificates.crt + exec \ s6-setuidgid abc /app/emby/EmbyServer \ -programdata /config \