mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
docker_upgrade.sh: Workaround for git refusing to work with a repo in attached volume
This commit is contained in:
parent
571d94b051
commit
c64fb7a258
@ -51,7 +51,17 @@ docker build "scripts/docker/${IMAGE_NAME}" --file "scripts/docker/${IMAGE_NAME}
|
||||
|
||||
echo "-- test_docker @ '${PWD}'"
|
||||
|
||||
docker run --rm --volume "${PWD}:/root/project" "${IMAGE_NAME}" "/root/project/scripts/ci/${IMAGE_NAME}_test_${IMAGE_VARIANT}.sh"
|
||||
# NOTE: Since /root/project/ is a dir from outside the container and the owner of the files is different,
|
||||
# git show in the script refuses to work. It must be marked as safe to use first.
|
||||
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/
|
||||
docker run \
|
||||
--rm \
|
||||
--volume "${PWD}:/root/project" \
|
||||
"${IMAGE_NAME}" \
|
||||
bash -c "
|
||||
git config --global --add safe.directory /root/project &&
|
||||
/root/project/scripts/ci/${IMAGE_NAME}_test_${IMAGE_VARIANT}.sh
|
||||
"
|
||||
|
||||
echo "-- push_docker"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user