Skip to content

Instantly share code, notes, and snippets.

$ cid=$(docker run -d busybox top)
$ docker exec -d $cid sleep 10000
$ execid=$(docker inspect $cid | jq -r '.[0].ExecIDs[0]')
$ echo -e "GET /exec/$execid/json HTTP/1.0\r\n" | nc -U /var/run/docker.sock | grep Pid || false
@runcom
runcom / test.go
Last active October 25, 2016 22:49
package main
import (
"bytes"
"io/ioutil"
"github.com/docker/engine-api/client"
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/container"
$ export id=$(docker run -d busybox sleep 10000)
$ docker exec -d $id tail -f /dev/null # runaway process
$ export exec_id=$(docker inspect $id | jq -r '.[0].ExecIDs[0]') # just getting the first one since there's only one
$ sudo kill -9 $(sudo cat /var/run/docker/libcontainerd/containerd/$id/$exec_id/pid)
$ docker inspect $id | jq -r '.[0].ExecIDs' # should be null as we killed it!
{
"default": [
{
"type": "reject"
}
],
"transports": {
"docker": {
"registry.access.redhat.com/rhel7": [
{
#!/bin/sh
PROG=${PROG:-docker}
if [ ! -f $PROG.spec ]; then
echo "no $PROG.spec found"
exit 1
fi
BRANCH=$(cat $PROG.spec | grep "Version: " | sed -e "s/Version: //" | cut -f1,2 -d.)
$ mkdir busybox-oci
$ docker save --format oci busybox:latest | tar -C busybox-oci -xf -
SWARM_SECRET=91pqsf3o0nax7mrfoiy5zy1d9 \
SWARM_CA_HASH=sha256:6b802f9d75708d71ea07c95c16ff5c26eaea01899010b6f401f63185ddacd375 \
SWARM_MASTER=192.168.122.57 \
ansible-playbook setup_worker.yml -i workers --ask-pass

Keybase proof

I hereby claim:

  • I am runcom on github.
  • I am runcom (https://keybase.io/runcom) on keybase.
  • I have a public key whose fingerprint is 09B9 8F09 3E2D C310 E250 69B5 B2BE AD15 0DE9 36B9

To claim this, I am signing this object:

----------------------------------------------------------------------
FAIL: docker_cli_pull_test.go:106: DockerHubPullSuite.TestPullAllTagsFromCentralRegistry
docker_cli_pull_test.go:130:
c.Assert(splitLatest, checker.DeepEquals, splitCurrent, check.Commentf("busybox:latest was changed after pulling all tags"))
... obtained []string = []string{"busybox", "latest", "0064fda8c45d", "6", "days", "ago", "1.113", "MB"}
... expected []string = []string{"busybox", "latest", "0292957ea1dd", "6", "days", "ago", "1.113", "MB"}
... busybox:latest was changed after pulling all tags
execve("./bundles/latest/dynbinary/docker", ["./bundles/latest/dynbinary/docke"..., "version"], [/* 62 vars */]) = 0
brk(0) = 0x25d5000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f80b0079000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=126826, ...}) = 0
mmap(NULL, 126826, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f80b005a000
close(3) = 0
open("/lib64/libsystemd.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832