Skip to content

Instantly share code, notes, and snippets.

View dmcgowan's full-sized avatar

Derek McGowan dmcgowan

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dmcgowan on github.
  • I am dmcg (https://keybase.io/dmcg) on keybase.
  • I have a public key whose fingerprint is 8C7A 111C 2110 5794 B0E8 A27B F58C 5D0A 4405 ACDB

To claim this, I am signing this object:

@dmcgowan
dmcgowan / gist:3b97efc0099da7c6f263
Created April 30, 2015 20:45
Test namespace configuration
docker.io push https://registry-1.docker.io
docker.io pull https://registry-1.docker.io
custom.example.com push http://localhost:5000
custom.example.com pull http://localhost:5000
@dmcgowan
dmcgowan / gist:bb24f1a4a4b69c213a24
Created June 30, 2015 22:35
Push by digest error
$ docker pull hello-world
latest: Pulling from library/hello-world
a8219747be10: Already exists
91c95931e552: Already exists
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd18681cf5daeb82aab55838d
Status: Image is up to date for docker.io/library/hello-world:latest
$ docker tag hello-world:latest dmcgowan/hello-world-test:latest
$ docker push dmcgowan/hello-world-test:latest
The push refers to a repository [dmcgowan/hello-world-test] (len: 1)
91c95931e552: Image successfully pushed
@dmcgowan
dmcgowan / failure-logs.txt
Created March 29, 2016 18:50
Docker #21555 investigation
time="2016-03-29T11:19:58.406144040-07:00" level=debug msg="Calling POST /v1.22/build"
time="2016-03-29T11:19:58.406180946-07:00" level=debug msg="POST /v1.22/build?buildargs=%7B%7D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&docker
file=Dockerfile&memory=0&memswap=0&nocache=1&q=1&rm=1&shmsize=0&ulimits=null"
time="2016-03-29T11:19:58.448656652-07:00" level=debug msg="[BUILDER] Command to be executed: &{[/bin/sh -c echo 123 >/a && printf abc >/b]}"
time="2016-03-29T11:19:58.469128605-07:00" level=debug msg="container mounted via layerStore: /home/docker/graph-1.10/overlay/4738e305aa1c8d541a86e68fb4b7ca8774c1f6b6c6067617
72c97cb49822f8d3/merged"
time="2016-03-29T11:19:58.478183340-07:00" level=debug msg="attach: stdout: begin"
time="2016-03-29T11:19:58.478253585-07:00" level=debug msg="attach: stderr: begin"
time="2016-03-29T11:19:58.479671658-07:00" level=debug msg="container mounted via layerStore: /home/docker/graph-1.10/overlay/4738e305aa1c8d541a86e68fb4b7ca8774c1f6b6c606
@dmcgowan
dmcgowan / overlay-output.txt
Last active May 17, 2016 20:15
New overlay driver storage analysis
# ./testpartition.sh /dev/loop0 overlay
++ mktemp -d
+ tmpdir=/tmp/tmp.kwAmm1WgsH
+ mount /dev/loop0 /tmp/tmp.kwAmm1WgsH
+ df /tmp/tmp.kwAmm1WgsH
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 15579920 38984 14726460 1% /tmp/tmp.kwAmm1WgsH
+ df -i /tmp/tmp.kwAmm1WgsH
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 999424 11 999413 1% /tmp/tmp.kwAmm1WgsH
@dmcgowan
dmcgowan / registry-noresumeable-log.txt
Created May 10, 2016 18:40
Registry Error log with
time="2016-05-10T11:39:15-07:00" level=warning msg="No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable." go.version=go1.6.2 instance.id=e509167d-5662-4c90-9e82-a44e216e23be version="v2.4.1+unknown"
time="2016-05-10T11:39:15-07:00" level=info msg="redis not configured" go.version=go1.6.2 instance.id=e509167d-5662-4c90-9e82-a44e216e23be version="v2.4.1+unknown"
time="2016-05-10T11:39:15-07:00" level=info msg="Starting upload purge in 51m0s" go.version=go1.6.2 instance.id=e509167d-5662-4c90-9e82-a44e216e23be version="v2.4.1+unknown"
time="2016-05-10T11:39:15-07:00" level=info msg="listening on [::]:5000" go.version=go1.6.2 instance.id=e509167d-5662-4c90-9e82-a44e216e23be version="v2.4.1+unknown"
time="2016-05-10T11:39:17-07:00" level=debug msg="authorizing request" go.version=go1.6.2 http.request.
@dmcgowan
dmcgowan / imagesize.sh
Last active May 17, 2016 22:05
Docker image disk usage tool
#!/bin/env sh
# imagesize.sh calculates the on disk size of images by pulling
# and comparing inode and block usage. Requires using a fresh
# device to accurately measure the difference caused by each
# image. This is intended to measure the on disk size caused
# by pulling an image with docker rather than the sum of all
# the file usage just inside the docker graph driver directory.
#
# Usage:
@dmcgowan
dmcgowan / testrun.sh
Created June 30, 2016 22:28
Test docker run on fresh device
#!/bin/env sh
# testrun.sh runs a docker container on a fresh device
# to test for errors mounting and running a container.
#
# Usage:
# sh testrun.sh <device> <storage driver> <image> [<run arg>, ...]
#
# How to use:
# $ fallocate -l 2GB testvolume
@dmcgowan
dmcgowan / update.diff
Last active July 8, 2016 17:00
Use `--` to specify variadic positional arguments
diff --git a/api/client/service/update.go b/api/client/service/update.go
index dc6e34c..f35bc17 100644
--- a/api/client/service/update.go
+++ b/api/client/service/update.go
@@ -2,6 +2,7 @@ package service
import (
"fmt"
+ "strings"
"time"
@dmcgowan
dmcgowan / overlay_test.sh
Created July 29, 2016 21:12
Demonstrate overlay bug with opaque directories using multiple lowers
#!/bin/sh
set -e
root=$(mktemp -d)
echo "--- Running in $root"
cd $root
mkdir -p lower1/lib