Skip to content

Assigns a SSH login for individual user to individual docker containers

License

Notifications You must be signed in to change notification settings

kjeldflarup/docker-compose-login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Compose Login

This setup is intended as a docker replacement for using chroot in /etc/passwd

A possible usage is a sftp/scp server, where the host has port 22 open for other purposes too.

Configuration of the container to run etc is done using docker-compose.yml Please see docker-compose.yml.sample

Important, there must be a service called user or the actual username.

This creates the user docker-compose-login, which cannot do a login, but is used as a middle stage, to be able to run docker.

Logins

The logins using the docker-compose-login are created like this: .. code :: bash

sudo adduser --gecos "" --ingroup docker-login --shell /srv/docker/docker-compose-login/docker-compose-login sslforfree

This creates a user with a home. Please feel fre to use --home and --no-create-home options, just be aware that the home must be writable to lock .Xauthority.

The generated home may be mapped into the container, but this may require an entry in docker-compose.yml per login.

About

Assigns a SSH login for individual user to individual docker containers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages