Skip to content

Commit

Permalink
fix(docker): use single layer for deployed image (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Aug 29, 2023
1 parent 5a1b23a commit 8819383
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,22 @@ _BUILD
# apply permissions to s6 run script
RUN chmod +x ./dockermod_root/etc/s6-overlay/s6-rc.d/init-mod-jellyfin-themerr-config/run

FROM scratch AS deploy
FROM scratch AS layer_stage

# variables
ARG PLUGIN_NAME="themerr-jellyfin"
ARG PLUGIN_DIR="/config/data/plugins"
ARG PLUGIN_DIR="/root-layer/config/data/plugins"

# add files from buildstage
# trailing slash on artifacts directory copies the contents of the directory, instead of the directory itself
COPY --link --from=buildstage /artifacts/ $PLUGIN_DIR/$PLUGIN_NAME

# copy s6 initialization files
COPY --link --from=buildstage /build/dockermod_root/ /
COPY --link --from=buildstage /build/dockermod_root/ /root-layer

FROM scratch AS deploy

# Linuxserver.io docker mods require that mods be fully contained in a single layer

# copy s6 initialization files
COPY --link --from=layer_stage /root-layer/ /

0 comments on commit 8819383

Please sign in to comment.