Skip to content

Commit

Permalink
Testing permissions and uid/gid
Browse files Browse the repository at this point in the history
  • Loading branch information
david-i-berry committed Aug 19, 2024
1 parent 49d9cb3 commit 5eed18b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ENV WIS2DOWNLOADER_CONFIG "/home/wis2downloader/app/config/config.json"
# Update, upgrade packages and install / clean up
RUN apt-get update && \
apt-get upgrade && \
apt-get install -y gettext-base=0.21-12 curl=7.88.1-10+deb12u6 cron=3.0pl1-162 git=1:2.39.2-1.1 && \
apt-get install -y gettext-base=0.21-12 curl=7.88.1-10+deb12u6 cron=3.0pl1-162 git=1:2.39.2-1.1 sudo && \
rm -rf /var/lib/apt/lists/*

# Now setup python env and default user
Expand Down
8 changes: 2 additions & 6 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ echo "Before usermod"
echo "$(id -g):$(id -u)"
echo "$(whoami)"

su - root
echo "I am (g)root"
echo "$(id -g):$(id -u)"
echo "$(whoami)"
usermod -u $(id -u) wis2downloader
groupmod -g $(id -g) wis2
su -c "usermod -u $(id -u) wis2downloader" root
su -c "groupmod -g $(id -g) wis2" root

# switch to wis2downloader user
su - wis2downloader
Expand Down

0 comments on commit 5eed18b

Please sign in to comment.