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 / 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 / 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 / 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 / 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 / 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 / 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
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 / 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)
@tonistiigi
tonistiigi / run.sh
Created December 6, 2014 11:19
pangalink.net phantomjs ssl
% phantomjs --debug=true --ignore-ssl-errors=true --ssl-protocol=TLSv1 t.js
2014-12-06T13:17:26 [DEBUG] CookieJar - Created but will not store cookies (use option '--cookies-file=<filename>' to enable persisten cookie storage)
2014-12-06T13:17:26 [DEBUG] Phantom - execute: Configuration
2014-12-06T13:17:26 [DEBUG] 0 objectName : ""
2014-12-06T13:17:26 [DEBUG] 1 cookiesFile : ""
2014-12-06T13:17:26 [DEBUG] 2 diskCacheEnabled : "false"
2014-12-06T13:17:26 [DEBUG] 3 maxDiskCacheSize : "-1"
2014-12-06T13:17:26 [DEBUG] 4 ignoreSslErrors : "true"
2014-12-06T13:17:26 [DEBUG] 5 localToRemoteUrlAccessEnabled : "false"
2014-12-06T13:17:26 [DEBUG] 6 outputEncoding : "UTF-8"
### Keybase proof
I hereby claim:
* I am tonistiigi on github.
* I am tonistiigi (https://keybase.io/tonistiigi) on keybase.
* I have a public key whose fingerprint is 59A3 9F7D BC14 D7BB 3B60 D07C 64F0 8A71 E53F DD42
To claim this, I am signing this object: