diff options
| author | Sparky <sparky@possumlodge.me> | 2019-01-25 13:26:55 -0500 |
|---|---|---|
| committer | Sparky <sparky@possumlodge.me> | 2019-01-25 13:27:12 -0500 |
| commit | 9f83ee7b3ecc7613ddcdcf6a7920b05569e54d26 (patch) | |
| tree | bcb507d0ee9b55743c09e1c43bd341b63ed937e9 | |
| parent | e0315b569591b71938829a8f35ac264399ef66bd (diff) | |
Make another docker layer reusable
By moving the apt-get layer before the copies, the apt-get layer can be reused with each build, reducing upload/download needed during updates.
Just a small optimization.
| -rw-r--r-- | Dockerfile | 9 | ||||
| -rw-r--r-- | Dockerfile.arm | 4 | ||||
| -rw-r--r-- | Dockerfile.arm64 | 4 |
3 files changed, 8 insertions, 9 deletions
diff --git a/Dockerfile b/Dockerfile index b014afcd2..4f727b4b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,11 +22,6 @@ RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \ FROM microsoft/dotnet:${DOTNET_VERSION}-runtime -COPY --from=builder /jellyfin /jellyfin -COPY --from=ffmpeg /ffmpeg-bin/* /usr/bin/ -EXPOSE 8096 -VOLUME /config /media - # libfontconfig1 is required for Skia RUN apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y \ @@ -34,4 +29,8 @@ RUN apt-get update \ && apt-get clean autoclean \ && apt-get autoremove \ && rm -rf /var/lib/{apt,dpkg,cache,log} +COPY --from=builder /jellyfin /jellyfin +COPY --from=ffmpeg /ffmpeg-bin/* /usr/bin/ +EXPOSE 8096 +VOLUME /config /media ENTRYPOINT dotnet /jellyfin/jellyfin.dll -programdata /config diff --git a/Dockerfile.arm b/Dockerfile.arm index 239fdd1c1..657cb4ac6 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -16,9 +16,9 @@ RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \ FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm32v7 -COPY --from=builder /jellyfin /jellyfin -EXPOSE 8096 RUN apt-get update \ && apt-get install -y ffmpeg +COPY --from=builder /jellyfin /jellyfin +EXPOSE 8096 VOLUME /config /media ENTRYPOINT dotnet /jellyfin/jellyfin.dll -programdata /config diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 6d7aa2118..979dfc1dc 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -24,10 +24,10 @@ RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \ FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm64v8 +RUN apt-get update \ + && apt-get install -y ffmpeg COPY --from=qemu_extract qemu-* /usr/bin COPY --from=builder /jellyfin /jellyfin EXPOSE 8096 -RUN apt-get update \ - && apt-get install -y ffmpeg VOLUME /config /media ENTRYPOINT dotnet /jellyfin/jellyfin.dll -programdata /config |
