Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(atlantis-image): add missing atlantis user in Debian image #3317

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Apr 11, 2023

what

  • add atlantis user to debian image

why

tests

  • I have tested my changes by building Docker locally
% docker run --platform linux/amd64 -it ed5edec1285d /bin/bash
root@87731013d732:/# getent passwd atlantis
atlantis:x:1000:1000::/home/atlantis:/bin/bash

references

Closes #3318

@wyardley wyardley requested a review from a team as a code owner April 11, 2023 03:07
@github-actions github-actions bot added the build Relating to how we build Atlantis label Apr 11, 2023
@wyardley wyardley force-pushed the wyardley/debian-user branch 2 times, most recently from f99f2a1 to 340877d Compare April 11, 2023 03:15
@@ -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 && \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy to make this have a stable uid / gid if folks think it's useful here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in the alpine this was 1001 I believe

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not find any reference on that so I think is ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is copied from the old Debian dockerfile, and I didn’t see the Alpine one setting it either.

Copy link

@arohter arohter Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw, I believe (older) alpine images were uid=100, gid=1000

# cat /etc/passwd  | grep atlantis
atlantis:x:100:1000:Linux User,,,:/home/atlantis:/sbin/nologin

Current debian image uid=1000 (gid=1000 unchanged)

# cat /etc/passwd | grep atlantis      
atlantis:x:1000:1000::/home/atlantis:/bin/bash

bmbferreira
bmbferreira previously approved these changes Apr 11, 2023
@nitrocode
Copy link
Member

@jamengual @GenPage

@nitrocode nitrocode changed the title build: add missing atlantis user in Debian image fix(atlantis-image): add missing atlantis user in Debian image Apr 11, 2023
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`
@GenPage GenPage force-pushed the wyardley/debian-user branch from 2160d50 to a3b8848 Compare April 11, 2023 20:50
@GenPage GenPage merged commit fd1ce43 into runatlantis:main Apr 11, 2023
@GenPage
Copy link
Member

GenPage commented Apr 11, 2023

Merging this. The docker build shouldn't push to the repo and thus the failure. Will fix that along with some other issues missed in #3001

@nitrocode nitrocode added this to the v0.23.5 milestone Apr 16, 2023
nitrocode pushed a commit that referenced this pull request May 5, 2023
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`
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
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`
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Relating to how we build Atlantis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

debian docker container won't start
6 participants