Skip to content

Commit

Permalink
build: add missing atlantis user in Debian image (runatlantis#3317)
Browse files Browse the repository at this point in the history
It appears that when runatlantis#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`
  • Loading branch information
wyardley authored and ijames-gc committed Feb 13, 2024
1 parent 10e261f commit 74e1801
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,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
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 74e1801

Please sign in to comment.