- docker CLI commands: api/client/commands.go
- docker run flags parsing: runconfig/parse.go
- docker container config: runconfig/config.go
- docker API handlers: api/server/server.go
- docker Job dispatcher: server/server.go
- docker Daemon commands: daemon/daemon.go
- docker Container commands: daemon/container.go
- docker native execution driver commands: daemon/execdriver/native/create.go
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 gcloud import datastore | |
>>> dataset = datastore.dataset('foo') | |
>>> entity = dataset.entity('Foo', 1) # complete key | |
>>> entity.key | |
('Foo', 1L) | |
>>> entity.save() # or dataset.upsert(entity) | |
>>> entity = dataset.entity('Foo') # incomplete key | |
>>> entity.key | |
('Foo',) | |
>>> entity.save() # or dataset.upsert(entity) |
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
go tool cgo -godefs=true netdevice.go | |
// Created by cgo -godefs - DO NOT EDIT | |
// cgo -godefs=true netdevice.go | |
package foo | |
type IfReq struct { | |
Ifrn [16]byte | |
Ifru [24]byte | |
} |
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
import requests | |
import json | |
class Client(object): | |
def __init__(self, base_url): | |
self.base_url = base_url | |
def build_url(self, path): | |
return self.base_url + path |
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
echo "FROM debian\nRUN apt-get update" | perl -w -MArchive::Tar -e 'my $tar = Archive::Tar->new; $tar->add_data("Dockerfile", <>); print $tar->write' | curl --data-binary @- --header 'Content-Type: application/x-tar' --dump-header - --no-buffer 'http://localhost:4243/build?rm=1&nocache=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
#!/bin/bash | |
set -ex | |
USAGE='usage: dd if=<source> | DISK= BUCKET= [ZONE= SIZE=] pdstrap.sh' | |
DISK=${DISK:?missing ${USAGE}} | |
BUCKET=${BUCKET:?missing ${USAGE}} | |
ZONE=${ZONE:-us-central1-a} | |
SIZE=${SIZE:-200} | |
TMPDIR=$(mktemp -d) |
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 google/cloud-sdk | |
RUN apt-get update && apt-get install -y --no-install-recommends curl sshpass netcat-traditional | |
RUN curl https://get.docker.io/builds/Linux/x86_64/docker-latest -o /bin/docker && chmod +x /bin/docker | |
RUN curl http://stedolan.github.io/jq/download/linux64/jq -o /bin/jq && chmod +x /bin/jq | |
ADD gce2docker-fork.sh / | |
EXPOSE 44243 | |
ENV DOCKER_HOST :44243 | |
ENTRYPOINT ["/gce2docker-fork.sh"] |
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
$ ls | |
builder-context/ | |
myapp-context/ | |
Dockerfile | |
Dockerfile.template | |
$ docker build -t myapp-builder . # assemble my builder image | |
$ docker run myapp-builder # build my app | |
<output a tar w/ a Dockerfile on stdout> | |
$ docker run myapp-builder | docker build -t myapp - # build my app |
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
{ | |
"provider": "gce", | |
"bootstrapper": { | |
"workspace": "/target" | |
}, | |
"image": { | |
"name": "disk", | |
"description": "Debian {system.release} {system.architecture}" | |
}, | |
"system": { |
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 busybox | |
VOLUME ["/.config"] | |
ADD private /.config/private | |
CMD cat /.config/private |
OlderNewer