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

Update Dockerfile to address ssh-keygen errors on current image v2 #164

Merged
merged 3 commits into from
Oct 7, 2023

Conversation

lindsleycj
Copy link
Collaborator

I took it as a challenge to come up with a generic way to implement the changes needed to resolve issue #162 and proposed in PR #163

@lindsleycj lindsleycj changed the title Update Dockerfile to address ssh-keygen errors on current image Update Dockerfile to address ssh-keygen errors on current image v2 Aug 27, 2023
Copy link
Collaborator

@mikedorfman mikedorfman left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Contributor

@reweeden reweeden left a comment

Choose a reason for hiding this comment

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

So I guess it's happening because we run the docker command with

--user `id -u`

which we need to do so that file permissions map correctly to the host's file system.

Comment on lines +46 to +47
RUN \
echo "user:x:${USER}:0:root:/:/bin/bash" >> /etc/passwd
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use the useradd command instead? That would feel less error prone to me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@reweeden I've been playing with using useradd and it keeps hanging at the exporting layers part of the image build. Have you seen this before?

RUN \
         useradd -M -u ${USER} user

@lindsleycj lindsleycj merged commit 97bdb65 into master Oct 7, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants