Skip to content

Commit

Permalink
Add code to check UID and GID
Browse files Browse the repository at this point in the history
- Check if UID and GID is same for the user inside container and outside.
  • Loading branch information
Athmika-HS committed Mar 28, 2022
1 parent 461e6f5 commit 8ffe2b5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/docker-execute
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ REBUILD=false

echo "package: $2"
echo "Image: $IMAGE_NAME"
echo "UID: $(id -u)"
echo "GID: $(id -g)"
# Enable docker buildkit with inline cache builds
export DOCKER_BUILDKIT=1

Expand Down Expand Up @@ -102,7 +104,7 @@ CODE_DIR="/home/dependabot/dependabot-core"
#HOME="/Users/athmika"

touch .core-bash_history
docker run -dit \
docker run --privileged=true -dit \
-v "$(pwd)/.core-bash_history:/home/dependabot/.bash_history" \
-v "$(pwd)/.rubocop.yml:$CODE_DIR/.rubocop.yml" \
-v "$(pwd)/bin:$CODE_DIR/bin" \
Expand Down Expand Up @@ -237,11 +239,11 @@ docker run -dit \
#docker exec ${CONTAINER_NAME} bash -c 'chmod dependabot:dependabot /home/dependabot/dependabot-core/tmp';
docker exec ${CONTAINER_NAME} bash -c 'ls -ald /home/dependabot/dependabot-core/tmp;
ls -ald /home/dependabot/dependabot-core;
echo "UID: $(id -u)"
echo "GID: $(id -g)"
whoami;
ls -la /home/dependabot/.ssh;
eval $(ssh-agent -s);
ssh-add;
chmod 400 /home/dependabot/.ssh;
ssh-add /home/dependabot/.ssh/$(echo $(cat /home/dependabot/.ssh/config | grep IdentityFile) | cut -d " " -f 2 | cut -d "/" -f 3);
ssh -vv -p 29418 jenkins@gerrit.helpshift.com;
for c in $(ssh -p 29418 -o "StrictHostKeyChecking no" jenkins@gerrit.helpshift.com gerrit query --current-patch-set project:${REPO_NAME} branch:feature/dependabot | grep revision | tr -s " " | cut -d " " -f 3); \
Expand Down

0 comments on commit 8ffe2b5

Please sign in to comment.