docker: SSH access directly into container

后端 未结 4 1126
孤城傲影
孤城傲影 2021-01-06 07:41

Up to now we use several linux users:

  • system_foo@server
  • system_bar@server
  • ...

We want to put the system users into docker cont

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-06 08:05

    Judging by the comments, you might be looking for a solution like dockersh. dockersh is used as a login shell, and lets you place every user that logins to your instance into an isolated container.

    This probably won't let you use sftp though.

    Note that dockersh includes security warnings in their README, which you'll certainly want to review:

    WARNING: Whilst this project tries to make users inside containers have lowered privileges and drops capabilities to limit users ability to escalate their privilege level, it is not certain to be completely secure. Notably when Docker adds user namespace support, this can be used to further lock down privileges.

提交回复
热议问题