Skip to content

Instantly share code, notes, and snippets.

View tonistiigi's full-sized avatar

Tõnis Tiigi tonistiigi

  • Docker
  • San Francisco
View GitHub Profile
@tonistiigi
tonistiigi / win-integration-cli.log
Created November 20, 2014 16:16
win-integration-cli.log
# TESTFLAGS="-v" ./contrib/local-build integration-cli
docker:osx-integration-cli
Waiting daemon to start....
bundles/1.3.1-dev already exists. Removing.
---> Making bundle: binary (in bundles/1.3.1-dev/binary)
Created binary: /c/Users/IEUser/gopath/src/github.com/docker/docker/bundles/1.3.1-dev/binary/docker-1.3.1-dev.exe
---> Making bundle: local-build (in bundles/1.3.1-dev/local-build)
diff --git a/integration-cli/docker_cli_events_test.go b/integration-cli/docker_cli_events_test.go
index eee9224..92ff241 100644
--- a/integration-cli/docker_cli_events_test.go
+++ b/integration-cli/docker_cli_events_test.go
@@ -64,7 +64,7 @@ func TestEventsPause(t *testing.T) {
t.Fatalf("event should be pause, not %#v", unpauseEvent)
}
- waitCmd := exec.Command(dockerBinary, "wait", "testeventpause")
+ waitCmd := exec.Command(dockerBinary, "wait", name)
@tonistiigi
tonistiigi / osx-integration-cli.log
Last active August 29, 2015 14:09
osx-integration-cli.log
# TESTFLAGS="-v" ./contrib/local-build integration-cli
docker:osx-integration-cli
Step 0 : FROM ubuntu:14.04
---> 5506de2b643b
Step 1 : MAINTAINER Tianon Gravi <[email protected]> (@tianon)
---> Using cache
---> b7a21ea27701
Step 2 : RUN apt-get update && apt-get install -y aufs-tools automake btrfs-tools build-essential curl dpkg-sig git iptables libapparmor-dev libcap-dev libsqlite3-dev lxc=1.0* mercurial parallel reprepro ruby1.9.1 ruby1.9.1-dev s3cmd=1.1.0* --no-install-recommends
---> Using cache
---> 207029fe7b82
@tonistiigi
tonistiigi / diff.patch
Created November 10, 2014 20:25
integration-cli osx
diff --git a/integration-cli/docker_utils.go b/integration-cli/docker_utils.go
index b9660d2..ea28942 100644
--- a/integration-cli/docker_utils.go
+++ b/integration-cli/docker_utils.go
@@ -9,6 +9,7 @@ import (
"net/http"
"net/http/httptest"
"net/http/httputil"
+ "net/url"
"os"
@tonistiigi
tonistiigi / dockerfile3.md
Last active August 29, 2015 14:08
dockerfile next

Dockerfile v3

This is written as a response to @erikh/@tiborvass dockerfile2 ideas.

Dockerfile defines how an image is built:

First line defines if we're using v1 or v3. Shebang header means v3.

Shebang shows what tool is used to make the build. Bash, Node.js etc.

@tonistiigi
tonistiigi / test.go
Last active August 29, 2015 14:08
TestAttachSlowContainer
func TestAttachSlowContainer(t *testing.T) {
defer deleteAllContainers()
c := exec.Command("/bin/bash", "-c", dockerBinary+` run --rm -i busybox /bin/sh -c "dd if=/dev/zero of=/foo bs=1024 count=1000 &>/dev/null; catv /foo"`)
stdout, err := c.StdoutPipe()
if err != nil {
t.Fatal(err)
}
if err := c.Start(); err != nil {
t.Fatal(err)
@tonistiigi
tonistiigi / gist:68946ccc44ac7a24f087
Created October 2, 2014 08:49
nested-builds-2.patch
diff --git a/builder/dispatchers.go b/builder/dispatchers.go
index 541a300..b2a2675 100644
--- a/builder/dispatchers.go
+++ b/builder/dispatchers.go
@@ -357,12 +357,17 @@ func build(b *Builder, args []string, attributes map[string]bool) error {
contextPath = filepath.Join(c.RootfsPath(), contextPath)
- if _, err := os.Stat(contextPath); os.IsNotExist(err) {
- return fmt.Errorf("no such directory: %s", contextPath)
@tonistiigi
tonistiigi / gist:10010330
Created April 6, 2014 19:16
al-pass-provider SEGFAULT
> gdb --args ./out/Release/node test/simple/test-abort-fatal-error.js
(gdb) run
............ done
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
AsyncWrap (this=0x100d07678, env=0x100f00190, provider=node::AsyncWrap::PROVIDER_TTYWRAP) at async-wrap-inl.h:45
45 bool parent_has_async_queue = parent != NULL && parent->has_async_queue();
(gdb) bt
@tonistiigi
tonistiigi / _
Last active August 29, 2015 13:57
spawn with closed stdin
var spawn = require('child_process').spawn
function run() {
var cat = spawn('cat')
cat.stdin.end('foo')
}
// process.stdin.resume()
// process.stdin.on('end', run)
-----BEGIN PUBLIC KEY-----
MIGcMA0GCSqGSIb3DQEBAQUAA4GKADCBhgKBgQDIRCzYvFIcFmBkIfStFBDL2Sav
LyDa02FAvUH1/lrM3P0J72lc+BJGNVSjUH0aBv8UrePLjXBZ3Yh9Lqux7e8HNGxp
syPb0JU4Mz/X3Jk+bASaMkcKBh34ADarB4plqcOngUuxLD+TJXlag83XoYcQwuYs
aQkU0ha3PMfmNX5LzQIA
-----END PUBLIC KEY-----