Comment on this Gist with any present or potential concerns regarding the design and use of libswarm.
This file contains 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 | web@0.0.0 /code |
This file contains 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 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 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 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 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 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() |
This file contains 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
# if you define to_a | |
irb(main):001:0> class Foo | |
irb(main):002:1> def to_a | |
irb(main):003:2> puts "hi" | |
irb(main):004:2> [] | |
irb(main):005:2> end | |
irb(main):006:1> end | |
=> nil | |
irb(main):007:0> [*Foo.new] | |
hi |
This file contains 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
docker-machine create -d virtualbox --virtualbox-boot2docker-url=https://github.com/tianon/boot2docker/releases/download/v1.6.0-rc4/boot2docker.iso dev-1.6.0-rc4 |
OlderNewer