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

Specify uid and gid in Dockerfile #3580

Closed
5 tasks
colin-axner opened this issue Sep 1, 2023 · 0 comments · Fixed by #3581
Closed
5 tasks

Specify uid and gid in Dockerfile #3580

colin-axner opened this issue Sep 1, 2023 · 0 comments · Fixed by #3581

Comments

@colin-axner
Copy link
Contributor

Summary

Specify uid/gid in the hermes.Dockerfile

Problem Definition

The Dockerfile uses "ubuntu:rolling"

Unfortunately, the default behaviour for the useradd directive actually changed between ubuntu 22 and ubuntu 23. Due to the rolling directive, v1.4.0 was built with ubuntu 22 and v1.4.1 was built with ubuntu 23

The interchaintest suite and subsequently the e2e's in ibc-go were expecting a user with uid/gid of 1000:1000 for hermes (default in ubuntu 22), but after the change to ubuntu 23 this broke:

Dockerfile

FROM ubuntu:latest
RUN apt-get -y update
RUN useradd -m appuser
USER appuser

build "22" with "ubuntu:latest"
build "23" with "ubuntu:rolling"

[user@user ~]$ docker run -it 22 bash
appuser@b4b1c6ff6e30:/$ id
uid=1000(appuser) gid=1000(appuser) groups=1000(appuser)
appuser@b4b1c6ff6e30:/$ exit
exit

[user@user ~]$ docker run -it 23 bash
appuser@a88909b10252:/$ id
uid=1001(appuser) gid=1001(appuser) groups=1001(appuser)
appuser@a88909b10252:/$ exit
exit

Proposal

Set the uid/gid of the user added so that these values do not accidentally change between releases and thus can be relied on as stable values for testing.

Acceptance Criteria


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant