mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-13 18:45:40 +00:00
Mark inventree home directory as safe for git.
Ref: https://github.blog/2022-04-12-git-security-vulnerability-announced/
This commit is contained in:
@ -95,6 +95,9 @@ RUN echo "Downloading InvenTree from ${INVENTREE_GIT_REPO}"
|
||||
|
||||
RUN git clone --branch ${INVENTREE_GIT_BRANCH} --depth 1 ${INVENTREE_GIT_REPO} ${INVENTREE_HOME}
|
||||
|
||||
# Ref: https://github.blog/2022-04-12-git-security-vulnerability-announced/
|
||||
RUN git config --global --add safe.directory ${INVENTREE_HOME}
|
||||
|
||||
# Checkout against a particular git tag
|
||||
RUN if [ -n "${INVENTREE_GIT_TAG}" ] ; then cd ${INVENTREE_HOME} && git fetch --all --tags && git checkout tags/${INVENTREE_GIT_TAG} -b v${INVENTREE_GIT_TAG}-branch ; fi
|
||||
|
||||
|
Reference in New Issue
Block a user