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 Docker Image has issues #1148

Open
sdouma opened this issue May 1, 2024 · 1 comment
Open

SSH Docker Image has issues #1148

sdouma opened this issue May 1, 2024 · 1 comment

Comments

@sdouma
Copy link

sdouma commented May 1, 2024

Description
I started a new docker magento(fresh images) and every time I would get an error saying an fpm instance was already started and I could not connect via ssh. I noticed that /usr/sbin/sshd didn't exist. After creating the dockerfile and building the image locally, it worked. I noticed on dockerhub that the digest shows a process to add php 8.2 but I didn't anything particular to set up ssh.

Steps To Reproduce

  1. Go through steps for an existing project

Expected Result
I can start my containers and ssh

Actual Result
I can't do those things and I can't even run basic commands like apt-get.

@Franz-Budon-Bapt
Copy link

Franz-Budon-Bapt commented Jun 9, 2024

I have same issue.
It's possible that the following commands in the docker-magento dockerfile are not running correctly and so the image is corrupted :
apt-get update && apt-get install -y ssh

When i do those commands manually inside the container, I get this :

docker exec -it magento-ssh-1 apt-get update && apt-get install -y ssh
Reading package lists... Done
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)

The issue is that for an unknown reason the root user is not by default in the FROM image debian:buster-slim.

With the following command that enforces the user as root, i was able to install the ssh daemon, which proves it was not installed in the first place :
docker exec -it --user root magento-ssh-1 apt-get install -y ssh

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

No branches or pull requests

2 participants