Skip to content

Commit

Permalink
build: add missing atlantis user in Debian image
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 GenPage committed Apr 11, 2023
1 parent 34ad9e9 commit a3b8848
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions 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 All @@ -39,4 +39,4 @@ services:

volumes:
redis:
driver: local
driver: local

0 comments on commit a3b8848

Please sign in to comment.