Skip to content

Commit

Permalink
Force submodule gitdir pointers to be relative when building Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneMcC committed Jan 8, 2019
1 parent 7a6ddbd commit ecb65fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ RUN \
chmod a+x /home/dfbnc/ssl.sh

RUN \
apk add --no-cache git openssl
apk add --no-cache git openssl coreutils bash

USER dfbnc

RUN \
cd /tmp/dfbnc && \
find -type f -name .git -exec bash -c 'f="{}"; cd $(dirname $f); echo "gitdir: ../../.git/modules/$(realpath --relative-to=/tmp/dfbnc .)" > .git' \; && \
if [ -e $(git rev-parse --git-dir)/shallow ]; then git init; git fetch --unshallow; fi && \
git fetch --tags && \
git submodule foreach 'if [ -e $(git rev-parse --git-dir)/shallow ]; then git init; git fetch --unshallow; fi' && \
Expand Down

0 comments on commit ecb65fc

Please sign in to comment.