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 e772660 commit be0aeb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ ENV DOWNLOAD_VALIDATE_TOPICS "false"
ENV DOWNLOAD_WORKERS 8
ENV LOG_PATH "/home/wis2downloader/app/logs"
ENV WIS2DOWNLOADER_CONFIG "/home/wis2downloader/app/config/config.json"
#ENV GROUP_ID 1002
#ENV USER_ID 1002
ENV HOST_UID 1002
ENV HOST_GID 1002

# Update, upgrade packages and install / clean up
RUN apt-get update && \
Expand Down
10 changes: 3 additions & 7 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#!/bin/bash
echo "$(id -u):$(id -g)"
# Update build uid and gid to align with those of instance
usermod -u 1020 wis2downloader
groupmod -g 127 wis2

# remove wis2downloader from sudo group
sudo "usermod -g wis2 wis2downloader"
usermod -u ${HOST_UID} wis2downloader
groupmod -g ${HOST_GID} wis2

# now demote to wis2downlaoder user
su -c wis2downloader
su - wis2downloader
# print the download_dir
echo "Download directory in container: $DOWNLOAD_DIR"

Expand Down

0 comments on commit be0aeb9

Please sign in to comment.