From a3b884873cc2838151b4c3fc303e53b6629336c0 Mon Sep 17 00:00:00 2001 From: William Yardley Date: Mon, 10 Apr 2023 20:05:25 -0700 Subject: [PATCH] build: add missing atlantis user in Debian image It appears that when #3001 combined the Dockerfiles, the bit that adds the `atlantis` user was not added to the Debian build stage Also correct some trailing spaces and missing EOL in `docker-compose.yml` --- Dockerfile | 7 +++++++ docker-compose.yml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 92149eef02..b8c40173a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -180,6 +180,13 @@ CMD ["server"] # Stage 2 - Debian FROM debian:${DEBIAN_TAG} AS debian +# Add atlantis user to Debian as well +RUN useradd --create-home --user-group --shell /bin/bash atlantis && \ + adduser atlantis root && \ + chown atlantis:root /home/atlantis/ && \ + chmod g=u /home/atlantis/ && \ + chmod g=u /etc/passwd + # copy binary COPY --from=builder /app/atlantis /usr/local/bin/atlantis # copy terraform diff --git a/docker-compose.yml b/docker-compose.yml index 70552e8540..a1b5230159 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,7 +20,7 @@ services: ports: - '6379:6379' command: redis-server --save 20 1 --loglevel warning --requirepass test123 - volumes: + volumes: - redis:/data atlantis: depends_on: @@ -39,4 +39,4 @@ services: volumes: redis: - driver: local \ No newline at end of file + driver: local