Skip to content

Commit

Permalink
changing -S to -e to verify if docker is the container runtime due to…
Browse files Browse the repository at this point in the history
… the way that Jenkins pods are setup
  • Loading branch information
EliseCastle23 committed Feb 20, 2024
1 parent c9e48bb commit 3faafab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gen3/bin/ecr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ecrReg="707767160287.dkr.ecr.us-east-1.amazonaws.com"
# lib -------------------------------

gen3_ecr_login() {
if [[ -S /var/run/docker.sock ]]; then
if [[ -e /var/run/docker.sock ]]; then
if gen3_time_since ecr-login is 36000; then
# re-authenticate every 10 hours
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin "707767160287.dkr.ecr.us-east-1.amazonaws.com" 1>&2 || exit 1
Expand All @@ -87,7 +87,7 @@ gen3_ecr_login() {

gen3_quay_login() {
if [[ -f ~/Gen3Secrets/quay/login ]]; then
if [[ -S /var/run/docker.sock ]]; then
if [[ -e /var/run/docker.sock ]]; then
if gen3_time_since quay-login is 36000; then
cat ~/Gen3Secrets/quay/login | docker login --username cdis+gen3 --password-stdin quay.io
fi
Expand Down Expand Up @@ -125,7 +125,7 @@ gen3_ecr_copy_image() {
fi
shift
shift
if [[ -S /var/run/docker.sock ]]; then
if [[ -e /var/run/docker.sock ]]; then
(docker pull "$srcTag" && \
docker tag "$srcTag" "$destTag" && \
docker push "$destTag"
Expand Down

0 comments on commit 3faafab

Please sign in to comment.