diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2025-02-20 22:53:27 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2025-02-20 22:53:27 +0100 |
| commit | e940d84f69e3fd627731d5d3f698d6f838797862 (patch) | |
| tree | 779eefcde993e22c0a69c18a3cb6e1cb9d17aad3 /docker/integration_test/web | |
| parent | bf025b4977543a371df9dbdddfe9cc2f02f2a8d0 (diff) | |
WIPWIP
Diffstat (limited to 'docker/integration_test/web')
| -rw-r--r-- | docker/integration_test/web/Dockerfile | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/docker/integration_test/web/Dockerfile b/docker/integration_test/web/Dockerfile index 2ba7a5d..5056fa1 100644 --- a/docker/integration_test/web/Dockerfile +++ b/docker/integration_test/web/Dockerfile @@ -1,6 +1,6 @@ FROM archlinux:base -RUN pacman -Suy --noconfirm && pacman -S openssl git --noconfirm +RUN pacman -Suy --noconfirm && pacman -S openssh openssl git --noconfirm # Docker still have this really stupied idea that all files must be relative "context", # so context is set to ../.. relative the docker-compose.yaml @@ -8,8 +8,27 @@ COPY server/target/x86_64-unknown-linux-musl/debug/eyeballs-githook /app/eyeball COPY server/target/debug/eyeballs /app/eyeballs COPY docker/integration_test/web/setup.sh /app/setup.sh +RUN mkdir -p /git/auth /git/repos + +# git image runs as default git user, with uid 1000 gid 1000. +# we need the same, but it can't be named git (as package git installs a git user) +# so add another user with 1000 gid 1000 and make sure that shared files +# (/git/auth and /git/repos) are owned by that user and not root. +RUN useradd --no-create-home --uid 1000 --user-group -s /usr/bin/nologin alf + +RUN chown alf:alf /app +RUN chown alf:alf /git/auth +RUN chown alf:alf /git/repos +VOLUME /git/auth +VOLUME /git/repos + +USER alf:alf + RUN mkdir -p -m 0700 /app/.ssh COPY docker/integration_test/web/gitkey /app/.ssh/id_rsa WORKDIR /app ENTRYPOINT /app/setup.sh + +HEALTHCHECK --start-interval=1s --timeout=1s CMD curl -f http://localhost:8000/api/v1/healthcheck + |
