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 6aa4dc4 commit 7e5edbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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 sudo && \
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 && \
rm -rf /var/lib/apt/lists/*

# Now setup python env and default user
Expand Down
7 changes: 4 additions & 3 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/bash

# Update build uid and gid to align with those of instance
sudo usermod -u $(id -u) wis2downloader
sudo groupmod -g $(id -g) wis2
usermod -u $(id -u) wis2downloader
groupmod -g $(id -g) wis2

su wis2downloader
# switch to wis2downloader user
su - wis2downloader

# print the download_dir
echo "Download directory in container: $DOWNLOAD_DIR"
Expand Down

0 comments on commit 7e5edbb

Please sign in to comment.