Skip to content

Instantly share code, notes, and snippets.

View calavera's full-sized avatar

David Calavera calavera

View GitHub Profile
@calavera
calavera / main.go
Created January 22, 2016 21:45
Concurrent docker exercise tool
package main
import (
"io"
"io/ioutil"
"log"
"time"
"github.com/docker/engine-api/client"
"github.com/docker/engine-api/types"
00:45:37 Deleted: b0605bb92b84ccd2e3f2bface1a23452a3146da1836c23298bd53ef2b9d7cf91
00:45:37 Error response from daemon: conflict: unable to delete a53353d1abea (cannot be forced) - image is being used by running container 2cfc5b418719
00:45:37 Error: failed to remove images: [a53353d1abea]
00:45:44 INFO: Cleanup complete

How to extract parts of a repo preserving history

Move the directories to extract to their new location (this step is optional)

$ git filter-branch --prune-empty --tree-filter \
    'if [ -d api/client/lib ]; then mv api/client/lib client; fi; if [ -d api/types ]; then mv api/types types; fi' \
    -- --all
David, please cover the following ground:
- API (and current effort for splitting out) and CLI
- API versioning, and associated issues
- Daemon (and current challenges for decoupling)
- Builder (and current effort for splitting it out)
Fetching profile from http://127.0.0.1:2376/debug/pprof/profile?seconds=20
Please wait... (20s)
{Saved profile in /home/calavera/pprof/pprof.127.0.0.1:2376.samples.cpu.025.pb.gz
PeriodType: cpu nanoseconds
Period: 10000000
Time: 2015-12-01 20:38:03.844868478 -0800 PST
Duration: 20s
Samples:
samples/count cpu/nanoseconds
1 10000000: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
  1. Enhance plugin API documentation

https://github.com/docker/libnetwork/blob/master/docs/remote.md

  1. Implement Exec driver

The purpose of this driver is to implement Network plugin protocol & call exec calls to an external driver This is useful for those stateless drivers that doesn’t have a long running process

  1. Implement Wrapper plugin
vagrant@gfs-client-1:~$ sudo cat /proc/self/mountinfo
17 22 0:15 / /sys rw,nosuid,nodev,noexec,relatime - sysfs sysfs rw
18 22 0:3 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw
19 22 0:5 / /dev rw,relatime - devtmpfs udev rw,size=245916k,nr_inodes=61479,mode=755
20 19 0:12 / /dev/pts rw,nosuid,noexec,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
21 22 0:16 / /run rw,nosuid,noexec,relatime - tmpfs tmpfs rw,size=50176k,mode=755
22 1 8:1 / / rw,relatime - ext4 /dev/disk/by-uuid/09fbe148-d7d9-4648-8f45-d9376fdb051e rw,data=ordered
23 17 0:17 / /sys/fs/cgroup rw,relatime - tmpfs none rw,size=4k,mode=755
24 17 0:18 / /sys/fs/fuse/connections rw,relatime - fusectl none rw
25 17 0:6 / /sys/kernel/debug rw,relatime - debugfs none rw

FEATURES

  • Promote volume drivers from experimental to master
  • Add rollover log driver, and --log-driver-opts flag
  • Add memory swappiness tuning options
  • Add support for DOCKER_CONFIG/--config to specify config file dir
  • Add --type flag for docker inspect command
  • Add new Fluentd logging driver
  • Allow docker import to load from local files
  • Add logging driver for GELF via UDP
@calavera
calavera / output
Created June 9, 2015 22:59
links.go
package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
)
func main() {
LIBGIT2=${LIBGIT2:-$(pwd)/vendor/libgit2}
export BUILD="$LIBGIT2/build"
export PCFILE="$BUILD/libgit2.pc"
FLAGS=$(pkg-config --static --libs $PCFILE) || exit 1
export CGO_LDFLAGS="$BUILD/libgit2.a -L$BUILD ${FLAGS}"
export CGO_CFLAGS="-I$LIBGIT2/include"
godep go build -x --ldflags '-extldflags "-static"' -o $dest