1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-14 01:57:32 +08:00

43 Commits

Author SHA1 Message Date
Marcos Lilljedahl
8b00e7d132 Add new parameter due to API change 2017-04-11 14:53:33 -03:00
Marcos Lilljedahl
d497c5f05b Autoremove container upon exit 2017-03-17 12:56:35 -03:00
Marcos Nils
b999083ec7 Return ordered ports to the interface (#101)
Fixes #100
2017-03-07 11:04:16 -03:00
Jonathan Leibiusky
f816be6f69 Add DNS support for PWD instances (#94)
* Add DNS support for PWD instances

* Store IP address of PWD in all session networks and restore it with the
same IP address

* Remove unnecesary print

* Change url format to pwd<ip>-port for better DNS filtering

* Make PWD listen on 80 and 443 for DNS resolve to work
2017-02-17 11:10:01 -03:00
Marcos Lilljedahl
4374b5b9c8 Fix condition 2017-02-01 18:25:28 -03:00
Marcos Lilljedahl
434256f9cc Increase pidslimit to 1000 and allow to override via env var 2017-02-01 17:29:14 -03:00
Marcos Lilljedahl
bfbe3abed5 Check that instance is present when setting ports 2016-12-29 14:10:21 -03:00
Marcos Lilljedahl
b48812b085 Apply apparmor profile if env variable is present 2016-12-28 14:40:19 -03:00
Marcos Nils
dea778440e Add TLS certificates for machine drivers (#73) 2016-12-27 18:53:50 +02:00
Marcos Lilljedahl
440ba09061 Change detach keys so other programs like nano work
Fixes #52
2016-12-21 19:09:22 -03:00
Jonathan Leibiusky (@xetorthio)
93226e30ff Fixes prometheus gauges
Fix session close. Now PWD gets disconnected from network before
deleting it.
2016-12-17 11:41:24 -08:00
Jonathan Leibiusky (@xetorthio)
69050373d7 Show docker swarm used ports 2016-12-13 08:02:48 -06:00
Jonathan Leibiusky @xetorthio
77905f3fd8 Query DinD instances for running containers and list the published ports
so the user can reverse proxy to the instance/port easily.
2016-12-01 17:28:55 -03:00
Jonathan Leibiusky
afa47c0bfc Periodic tasks refactor (#62)
* Once every second the session run a list of periodic tasks on every
instance concurrently. We use these tasks to do things like:
- Collect mem and cpu stats
- Check if instance is part of a swarm cluster
- Broadcast information to connected clients
2016-12-01 15:57:30 -03:00
Marcos Lilljedahl
10bdf3d5f2 Return swarm info to be displayed in the FE
This requires that PWD is working as a container in the same
network as all dinds

Add icons to swarmInfo
2016-11-29 10:52:55 -03:00
Jonathan Leibiusky @xetorthio
ec9d34ffda Add reverse proxy endpoint.
It works by using the Host of the request. When it receives something in
the form of: `<node>.<session>.play-with-docker.com` it does a reverse
proxy http request to `node`, validating that the `node` actually belongs
to the `session`.
If the node has a prefix `ip` and continues with a valid IP address
where the dots where replaces by underscores (like `ip10_0_0_1`) then it
will remove the `ip` prefix and and replace the underscores by dots, and
assume it is an ip address.
2016-11-23 11:52:59 -03:00
Antonis Kalipetis
dd8f63363e
Fix issue where instance name rotation was faulty
Previously, if node2 was deleted in a node1, node2, node3 set, the next node creation would fail since it would always try to assign node3 as a name.
Now, the first available name is always assigned.

Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
2016-11-22 10:42:19 +02:00
Marcos Lilljedahl
861355d4e3 Fix undetected bugs in instance renaming 2016-11-22 00:07:41 -03:00
Marcos Lilljedahl
8f5f9f2c90 Add container names to make attachable names work 2016-11-21 22:01:00 -03:00
Marcos Lilljedahl
a7d76f2720 Enumerate nodes to improve cluster configuration 2016-11-21 21:49:23 -03:00
Jonathan Leibiusky @xetorthio
8b0749a9ba Show cpu and memory stats of every node 2016-11-18 13:52:47 -03:00
Marcos Lilljedahl
23bb4eaf69 Add session persistence and use attach instead of exec 2016-11-14 21:29:32 -03:00
Marcos Lilljedahl
6148dd8d86 Ctrl-m is enter :S 2016-11-14 18:23:24 -03:00
Marcos Lilljedahl
227af2338d Change default dind detach keys to standard PQ can be used in PWD 2016-11-14 17:49:34 -03:00
Marcos Lilljedahl
46f95ce6a5 Increase limits and change ngrok instance 2016-11-14 16:38:57 -03:00
Marcos Lilljedahl
46a186f28b Add hostname to instance name 2016-11-14 01:29:36 -03:00
Marcos Nils
cdf1027e94 Memory limit (#26)
* Hardcode memory to 512mb

Fixes #21

* Add constants to define memory and disable OOM
2016-11-13 17:09:44 +02:00
Marcos Lilljedahl
54378862b3 Use docker 1.13 to allow overlay networks
- Print error if resizing fails
2016-11-13 01:11:45 -03:00
Jonathan Leibiusky (@xetorthio)
8e4981d24f Huge refactor to have everything working with socket.io
It fixes lots of bugs, can fallback to long polling, resize viewport of
terminals and share clients state of the session, so they all see the
same thing.
2016-11-10 10:42:08 -03:00
Marcos Lilljedahl
3dd5a8b5ef Set default resize options 2016-10-11 17:05:06 -03:00
Marcos Lilljedahl
50a08f265c Revert "Don't allocate a pseudo tty for shell attaches"
This reverts commit d87e288f6ffa15cf72d8b90567a5cf02e902bf7f.
2016-10-11 13:33:22 -03:00
Jonathan Leibiusky (@xetorthio)
d87e288f6f Don't allocate a pseudo tty for shell attaches 2016-10-11 13:25:33 -03:00
Jonathan Leibiusky (@xetorthio)
59844cb80c Create a pseudo tty to docker daemons 2016-10-11 13:03:30 -03:00
Marcos Nils
429a5f9014 Merge pull request #4 from alexellis/ulimit_experimental
Experimental ulimit implementation and README.md
2016-10-11 01:25:06 +02:00
Marcos Lilljedahl
672b85cfe3 Remove volumes when deleting instances
Fixes #1
2016-10-09 21:16:58 +02:00
Alex
7df6bacee5 Allow dind image to be overriden.
- improve readme - mention pre-pulling dind image.
- read env variable once in init() method
2016-10-09 19:49:34 +01:00
Alex
11749c4902 Provide DIND override through DIND_IMAGE env variable. Use pinned version of DIND by default instead of latest to prevent surprises. 2016-10-09 19:37:53 +02:00
Alex
74e8502f3f - Fix .gitignore
- Note about bug with Docker driver
- Implement experimental pid ulimit of 150.
2016-10-09 18:58:32 +02:00
Marcos Lilljedahl
b3e7dcae3b Make session replication 2016-10-08 14:26:25 +02:00
Jonathan Leibiusky (@xetorthio)
02d50073c5 Attach to the same terminal 2016-10-08 13:35:02 +02:00
Marcos Lilljedahl
b79850c50f Create overlay networks by default 2016-10-08 11:25:50 +02:00
Jonathan Leibiusky (@xetorthio)
b6b849e2c6 Change import paths
Add session cleanup
2016-10-08 10:25:10 +02:00
Jonathan Leibiusky (@xetorthio)
dde49d8700 Initial commit 2016-10-08 03:12:48 +02:00