Skip to content

Commit

Permalink
Merge pull request #96 from dls-controls/dev
Browse files Browse the repository at this point in the history
restore git https fix in startup
  • Loading branch information
gilesknap authored Jun 2, 2023
2 parents cfb6d95 + 3f434a6 commit 9f5b22b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions c7
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,16 @@ elif [[ ${running} == "false" ]]; then
echo "Creating new dev-c7 container version ${version_tag:- Unknown} ..."
${logging}

# Restore bash as the default shell and
# Remove the git ownership check because this matches the behaviour of RHEL7 git
# At runtime we launch bash in the container and perform the following:
# Restore bash as the default shell in etc/passwd
# Reinstall git-core to overcome issue of https plugin missing
# Remove the git safe directory check to match the behaviour of RHEL7 git
podman run -dit --name ${container_name} ${runtime} ${environ}\
${identity} ${volumes} ${devices} ${opts} ${image}:${version} \
bash -c "sudo sed -i s#/bin/sh#/bin/bash# /etc/passwd ;
sudo yum -y reinstall git-core ;
git config --global --add safe.directory '*' ;
bash"

fi

# Execute a shell in the container - this allows multiple shells and avoids
Expand Down

0 comments on commit 9f5b22b

Please sign in to comment.