diff options
author | Earl Warren <contact@earl-warren.org> | 2024-10-16 21:03:27 +0200 |
---|---|---|
committer | Earl Warren <contact@earl-warren.org> | 2024-10-16 21:07:22 +0200 |
commit | 7d779a7859834d42d2feddb247e1a6e1346e720c (patch) | |
tree | 0d917986fdcd7851d35539e0e1421d5a182eed5c | |
parent | Merge pull request 'docs: add link to the v9.0.0 release notes' (#5391) from ... (diff) | |
download | forgejo-7d779a7859834d42d2feddb247e1a6e1346e720c.tar.xz forgejo-7d779a7859834d42d2feddb247e1a6e1346e720c.zip |
unecessary container image layer duplication
container images grew by 100MB when
RUN ln /app/gitea/gitea /app/gitea/forgejo-cli
was added because hard links are not preserved.
Use symbolic links instead.
https://tauri.earth/@AliveDevil/113318561067465279
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | Dockerfile.rootless | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile index 01ab36b711..668a5da25e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -103,6 +103,6 @@ CMD ["/bin/s6-svscan", "/etc/s6"] COPY --from=build-env /tmp/local / RUN cd /usr/local/bin ; ln -s gitea forgejo COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea -RUN ln /app/gitea/gitea /app/gitea/forgejo-cli +RUN ln -s /app/gitea/gitea /app/gitea/forgejo-cli COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh diff --git a/Dockerfile.rootless b/Dockerfile.rootless index d2f5f71524..32d4966535 100644 --- a/Dockerfile.rootless +++ b/Dockerfile.rootless @@ -90,7 +90,7 @@ RUN chown git:git /var/lib/gitea /etc/gitea COPY --from=build-env /tmp/local / RUN cd /usr/local/bin ; ln -s gitea forgejo COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea -RUN ln /app/gitea/gitea /app/gitea/forgejo-cli +RUN ln -s /app/gitea/gitea /app/gitea/forgejo-cli COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh |