• Stars
    star
    305
  • Rank 133,905 (Top 3 %)
  • Language
  • Created about 8 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build serverless apps with Docker

Serverless Docker

Swarm makes it incredibly easy to run code on your infrastructure. You wrap some code up inside a Docker container, and Swarm will make it run on whatever free resources you have.

But what if those containers could also run other containers on a Swarm? We could put pieces of our application inside containers that are run on-demand on a Swarm. Docker containers can be used as functions from within other applications:

>>> import dockerrun
>>> client = dockerrun.from_env()
>>> client.run("bfirsh/leftpad", ["foo", "5"])
'  foo\n'

Take, for example, running background tasks in a web app. In a traditional architecture, you would have a set of task workers and a message queue to pass work from the web frontends to the task workers.

If your web frontends have access to a Swarm, you can run the task directly on your Swarm:

client.run("tasks/reticulate-splines", detach=True)

To read more about this, check out this blog post.

Examples

## Reading

Tools

  • Funker – Functions as Docker containers
  • go-dcgi – CGI, but with Docker containers

## Client libraries

  • docker-py – Run Docker containers from Python apps
  • dockerrun – A simpler interface for running Docker containers in Python (soon to be part of docker-py)
  • go-dexec – Like Go os/exec package but for Docker
  • dockerode – Run Docker containers from Node.js apps
  • docker-java – Run Docker containers from Java apps

Stuff that needs working on

We need your help!

  • Make this work with Docker 1.12.
  • A proxy that scopes a Docker API so that containers can securely manage and run "child" containers.
  • Helpers for injecting the Docker API socket into containers that are run.
  • A server for running scheduled / cron jobs as Docker containers on a Swarm.

More Repositories

1

jsnes

A JavaScript NES emulator.
JavaScript
5,921
star
2

jsnes-web

A browser UI for JSNES, a JavaScript NES emulator
JavaScript
569
star
3

django-shorturls

A URL shortening app for Django
Python
405
star
4

funker

Functions as Docker containers
252
star
5

dynamicaudio.js

An interface for the Web Audio API with a Flash shim for older browsers
JavaScript
168
star
6

loom

Elegant deployment with Fabric and Puppet.
Python
116
star
7

whiskerboard

Stashboard, now with less vendor lock-in.
Python
112
star
8

otter

A server that runs your client-side apps.
CoffeeScript
82
star
9

django-class-based-views

Work on class-based views, now part of Django 1.3. For a backport to Django 1.2, see https://github.com/sorl/django-cbv
Python
79
star
10

serverless-docker-voting-app

A serverless web app built with Docker
HTML
60
star
11

naming-test-suite

How I name products/projects/tools
39
star
12

vNES

A mirror of Jamie Sanders' Java NES emulator, which once lived at virtualnes.com
Java
36
star
13

django-docker-heroku-template

Get a Django app up and running in dev, test, and production with best practices in 10 minutes
Python
35
star
14

python-echoprint

Python library for the Echoprint music identification service
C++
27
star
15

dockerrun

A dead simple Python library for running Docker commands
Python
25
star
16

funker-example-voting-app

An example app using Funker
JavaScript
24
star
17

pspec

Python testing for humans.
Python
21
star
18

syndication-view

Django feeds as class based views, now part of Django 1.2.
Python
21
star
19

pytest_django

A Django plugin for py.test.
Python
19
star
20

django-database-files

A storage system for Django that stores uploaded files in the database.
Python
19
star
21

docker-export-volumes

A Docker image to export volumes from containers
Python
16
star
22

go-dcgi

CGI, but with Docker containers
Go
13
star
23

django-docker-cloud-template

A template for creating Django applications that run on Docker Cloud
Python
12
star
24

funker-go

Funker for Go
Go
12
star
25

heroku-tarsnap-backups

Make offsite backups of Heroku apps on Tarsnap
Shell
11
star
26

django-mptt

It's MPTT, but with abstract model awesomeness.
Python
11
star
27

docker-redoc

A Docker image which serves ReDoc documentation
HTML
11
star
28

funker-python

Python
9
star
29

swarm-viz

HTML
9
star
30

miles

A JavaScript framework for actually getting things done
JavaScript
8
star
31

dotfiles

Vim Script
8
star
32

virtualdocker

Go
8
star
33

docker-reticulate-splines

Shell
7
star
34

herokup

Upload stuff to Heroku that isn't in Git.
Shell
7
star
35

funker-node

JavaScript
7
star
36

jstunes

A JavaScript audio player
JavaScript
7
star
37

rrun

rsync the current directory and run a command over ssh
Shell
6
star
38

docker-sdk-go

WIP: Prototype of a better Go client for Docker
Go
5
star
39

fir.sh

SCSS
5
star
40

paperpets

Mini origami pets for Little Printer
CSS
5
star
41

jsnes-roms

4
star
42

charingcross

Project planning with GitHub issues
Python
4
star
43

docker-api-reference

WIP: Better API reference for Docker, built on Swagger
HTML
3
star
44

docker-go-client-example

Go
3
star
45

vqgan-clip

Python
3
star
46

antsy

Multi-line console animation in Go
Go
2
star
47

cog-segformer

Python
2
star
48

ip

Python
2
star
49

backbone-otter

Tools for writing Otter apps with Backbone
JavaScript
2
star
50

puppet-cloudkick

A Puppet module for Cloudkick.
Shell
2
star
51

haikuplayer

Python
2
star
52

docker-sdk-python

WIP
Python
2
star
53

riffusion-cog

Riffusion as a Cog model
Python
2
star
54

docker-cloud-subdomains

Automatic Heroku-style subdomains for Docker Cloud
Python
2
star
55

internetarchive-pdfjs-isbn-links

JavaScript
2
star
56

hubot-shipping-forecast

CoffeeScript
1
star
57

replicate-screenshots

1
star
58

docker-oauth2_proxy

1
star
59

interlock-haproxy-swarm

Interlock configured to use a Swarm set up by Machine
Shell
1
star
60

python-sdk

Facebook Platform Python SDK
Python
1
star
61

patchwork

JavaScript
1
star
62

compose-mongodb-demo

Python
1
star