Skip to content

Commit

Permalink
Swap from ENV to ARG for USER_ID - build time variable used to set ui…
Browse files Browse the repository at this point in the history
…d for user.

Additional statements in test-docker.yml to set vars.
  • Loading branch information
david-i-berry committed Aug 22, 2024
1 parent 16941ad commit 38a3f1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- name: Build test environment
working-directory: docker/tests
run: |
DOCKER_GID="$(getent group docker | cut -d: -f3)"
export DOCKER_GID
# create user for wis2downloader
sudo usermod -aG docker "$(whoami)"
docker compose build # build containers
Expand Down Expand Up @@ -78,4 +80,6 @@ jobs:
- name: Shutdown
working-directory: docker/tests
run: |
DOCKER_GID="$(getent group docker | cut -d: -f3)"
export DOCKER_GID
docker compose down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.12-slim-bookworm
ARG USER_ID=12135

SHELL ["/bin/bash", "-c"]

# default ENV / config
ENV DOWNLOAD_BROKER_HOST "globalbroker.meteo.fr"
ENV DOWNLOAD_BROKER_PORT 443
Expand All @@ -15,7 +15,7 @@ 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 USER_ID 12135


# Update, upgrade packages and install / clean up
RUN apt-get update && \
Expand Down

0 comments on commit 38a3f1a

Please sign in to comment.