All Projects → fcwu → docker-lightop

fcwu / docker-lightop

Licence: other
docker login manager

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
CSS
56736 projects
shell
77523 projects
c
50402 projects - #5 most used programming language

Docker Lightop

docker-lightop is a login manager for various sessions, which are docker containers that provides their own web interface. Currently, this project provides sessions including,

When user login to the session, the container, if not exist, will be created immediatey. The user home folder(~) in every containers of the same user will be mounted to the same volume. The public folder located at /mnt/public, which shares to the all users of this service.

docker-lightop will help to route the network traffic, either http or websocket, to specific container accroding to the URL. For example, docker-lightop routes the request http://$IP:$PORT/u/ubuntu-trusty-ttyjs/ to the IP address of container named $USER_ubuntu-trusty-ttyjs, where the service port is retrieved by image expose configuration of the image.

Build and Run

Build yourself

docker build --rm -t dorowu/lightop . 
docker build --rm -t dorowu/lightop-ubuntu-trusty-ttyjs docker-repo/ubuntu-trusty-ttyjs/
docker build --rm -t dorowu/lightop-ubuntu-trusty-lxde docker-repo/ubuntu-trusty-lxde

Run

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -p 6050:6050 -p 6051:6051 dorowu/lightop

Browse

http://$IP:6050/

that default account is admin/admin

Screenshot

API

IP=127.0.0.1
curl -sq -XPOST -c cookies.txt -d 'username=admin&password=admin' http://$IP:6050/login
curl -sq -b cookies.txt  http://$IP:6050/user/
curl -sq -b cookies.txt -XPOST -d "username=walker&password=walker" http://$IP:6050/user/
curl -sq -b cookies.txt  http://$IP:6050/user/
curl -sq -b cookies.txt -XDELETE http://$IP:6050/user/2
curl -sq -b cookies.txt http://$IP:6050/session
curl -sq -b cookies.txt http://$IP:6050/container/
curl -sq -b cookies.txt -XDELETE http://$IP:6050/container/6a72a2e5c372
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].