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 problems when using SSH keys with a non-root users. #1033

Merged
merged 1 commit into from
May 27, 2019

Conversation

fago
Copy link
Contributor

@fago fago commented Apr 5, 2019

I'm using the CLI image with a SSH key set via environment variable. However this is currently not possible as non root.

I got it working with a line like

RUN /lagoon/entrypoints/05-ssh-key.sh && chown -R 1000:1000 /home/.ssh
in the dockerfile, but since the key file is made readonly this errors out on repeated runs. 600 should be just as safe (owner can change it anyway) and makes starting the container work.

TL/DR to repeat the problem:

  • Add the line above the add the key
  • Start the container as non-root user with the environment variable being still set

Result:

  • Error due to /home/.ssh/key being not writable anymore.

The PR fixes the problem.

@Schnitzel Schnitzel added this to the v0.23.0 milestone May 27, 2019
@Schnitzel Schnitzel merged commit 1106933 into uselagoon:master May 27, 2019
@fago fago deleted the patch-1 branch June 26, 2019 14:57
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.

2 participants