Permalink
Browse files

Force submodule gitdir pointers to be relative when building Dockerfile.

  • Loading branch information...
ShaneMcC committed Jan 8, 2019
1 parent 7a6ddbd commit ecb65fc65d296a8f4358ac52532ba9fa0f267ebc
Showing with 2 additions and 1 deletion.
  1. +2 −1 Dockerfile
@@ -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' && \

0 comments on commit ecb65fc

Please sign in to comment.