Skip to content

Instantly share code, notes, and snippets.

View dmcgowan's full-sized avatar

Derek McGowan dmcgowan

View GitHub Profile
@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 / main.go
Created April 16, 2023 07:48
Proxy differ using containerd default applier
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@dmcgowan
dmcgowan / overlay_test.sh
Created April 27, 2018 21:30
Test overlay multiple depths
#!/bin/sh
set -x
tempdir=$(mktemp -d)
oldpwd=$(pwd)
function cleanup() {
cd $oldpwd
umount -fR $tempdir
@dmcgowan
dmcgowan / containerd.service
Last active October 25, 2017 00:39
Containerd stress run script
[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target
[Service]
ExecStartPre=/sbin/modprobe overlay
ExecStart=/usr/local/bin/containerd
Delegate=yes
KillMode=process
@dmcgowan
dmcgowan / image_backend.go
Created May 5, 2017 23:26
Notes about requirements of Daemon for image management backend
package daemon
import (
"io"
"github.com/docker/distribution/reference"
"github.com/docker/docker/image"
"github.com/docker/docker/layer"
digest "github.com/opencontainers/go-digest"
)
@dmcgowan
dmcgowan / fetch.sh
Last active January 24, 2017 21:36
Script to fetch image configurations from hub
#!/bin/sh
if [ "$#" -ne 2 ]; then
echo "Wrong arguments, expect: <name> <tag>"
fi
IMAGE=$1
TAG=$2
TOKEN=$(curl -s "https://auth.docker.io/token?scope=repository:$IMAGE:pull&service=registry.docker.io" | jq -r .token)
CONFIG_DIGEST=$(curl -s -H"Accept: application/vnd.docker.distribution.manifest.v2+json" -H"Authorization: Bearer $TOKEN" "https://registry-1.docker.io/v2/$IMAGE/manifests/$TAG" | jq -r .config.digest)
#!/bin/sh
set -e
tmpdir=$(mktemp -d)
volume=$1
shift
if [ ! -f $volume ]; then
@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
@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 / 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