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

SSH access is not being granted to the local user #211

Closed
luisg123v opened this issue Jan 3, 2024 · 2 comments · Fixed by #212
Closed

SSH access is not being granted to the local user #211

luisg123v opened this issue Jan 3, 2024 · 2 comments · Fixed by #212
Assignees

Comments

@luisg123v
Copy link
Contributor

luisg123v commented Jan 3, 2024

If I create a new container and try to access using SSH, I'm asked for the odoo user's password.

I checked the file /home/odoo/.ssh/authorized_keys and it's empty.

@luisg123v
Copy link
Contributor Author

Hi @antonag32,

I tried to fix this myself, but it's taking me more than just a few minutes which it's what I though it would.

I looked at this and the SSH key is actually being added at this point. However, once the step finishes, file is restored as it was before the step started.

I also noticed, the previous way to do the same (without DeployV) was by a RUN command directly here, maybe that might be related to the cause.

Could you have a look to this issue, please?

CC @moylop260

antonag32 added a commit to vauxoo-dev/travis2docker that referenced this issue Jan 16, 2024
Since /home/odoo/.ssh is marked as a volume in the parent image, changes
to files in the directory during docker build are being lost when a new
container is created. Therefore the authorized_keys file is set directly
on the host and copied over to the container.

Closes Vauxoo#211.
@antonag32
Copy link
Contributor

So I looked around, tried different things, and ended up noticing that the .ssh folder is marked as a volume, which explains why authorized keys is not being persisted, apparently copied files do stay the same as they were originally.

This makes me wonder if therefore this feature has ever worked? I think the best solution would be to remove the volume from the base dockerfile (found in DeploV Static repo) but I have created a PR that fixes it in a different way.

antonag32 added a commit to vauxoo-dev/travis2docker that referenced this issue Jan 16, 2024
Since /home/odoo/.ssh is marked as a volume in the parent image, changes
to files in the directory during docker build are being lost when a new
container is created. Therefore the authorized_keys file is set directly
on the host and copied over to the container.

Closes Vauxoo#211.
luisg123v pushed a commit that referenced this issue Jan 20, 2024
Since /home/odoo/.ssh is marked as a volume in the parent image, changes
to files in the directory during docker build are being lost when a new
container is created. Therefore the authorized_keys file is set directly
on the host and copied over to the container.

Closes #211.
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 a pull request may close this issue.

2 participants