Comment on this Gist with any present or potential concerns regarding the design and use of libswarm.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
ADD foo.txt /foo.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat fig.yml | |
web: | |
build: ./web | |
command: npm ls | |
ports: | |
- 3000:3000 | |
$ fig up | |
Recreating koafig_web_1... | |
Attaching to koafig_web_1 | |
koafig_web_1 | [email protected] /code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat fig.yml | |
web: | |
build: ./web | |
command: find . | |
ports: | |
- 3000:3000 | |
$ fig up | |
Recreating koafig_web_1... | |
Attaching to koafig_web_1 | |
koafig_web_1 | . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat fig.yml | |
dckr: | |
image: ubuntu | |
command: ls / | |
volumes: | |
- /var/run/docker.sock:/docker.sock | |
$ fig up | |
Creating figldleworktest_dckr_1... | |
Attaching to figldleworktest_dckr_1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat fig.yml | |
dckr: | |
image: ubuntu | |
command: ls -l / | |
volumes: | |
- /var/run/docker.sock:/docker.sock | |
$ fig run dckr bash | |
root@dac750a9bcb3:/# apt-get install -y netcat > /dev/null | |
root@dac750a9bcb3:/# nc -U /docker.sock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl 'http://localhost:4243/v1.10/version' | |
{"Arch":"amd64","GitCommit":3600720,"GoVersion":"go1.2.1","KernelVersion":"3.8.0-29-generic","Os":"linux","Version":"0.9.1"} | |
$ curl --no-buffer -X POST 'http://localhost:4243/v1.10/images/create?fromImage=ubuntu&tag=' | |
{"status":"Pulling repository ubuntu"} | |
{"status":"Pulling image (raring) from ubuntu","progressDetail":{},"id":"eb601b8965b8"}{"status":"Pulling image (raring) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/","progressDetail":{},"id":"eb601b8965b8"}{"status":"Pulling image (lucid) from ubuntu","progressDetail":{},"id":"9cc9ea5ea540"}{"status":"Pulling image (lucid) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/","progressDetail":{},"id":"9cc9ea5ea540"}{"status":"Pulling image (saucy) from ubuntu","progressDetail":{},"id":"9f676bd305a4"}{"status":"Pulling image (saucy) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/","progressDetail":{},"id":"9f676bd305a4"}{"status":"Pulling image (precise) from ubuntu","progressD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func randomHexString(length int) (string, error) { | |
chars := "01234567890abcdef" | |
bytes := make([]byte, length) | |
for idx, _ := range bytes { | |
num, err := rand.Int(rand.Reader, big.NewInt(int64(len(chars)))) | |
if err != nil { | |
return "", err | |
} | |
bytes[idx] = chars[num.Int64()] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import create_engine, Table, Column, String, LargeBinary, MetaData | |
from sqlalchemy.sql import select | |
from io import BytesIO | |
class SQLStorage(object): | |
def __init__(self, url): | |
engine = create_engine(url) | |
self.conn = engine.connect() |
NOTE: this is out of date - refer to moby/moby#9694
Here is a preview build of two new features we’re working on concurrently: container grouping (docker groups
) and stack composition (docker up
). Together, they will eventually form a complete replacement for Fig.