Skip to content

Instantly share code, notes, and snippets.

View joekottke's full-sized avatar

Joe Kottke joekottke

  • San Francisco, CA
View GitHub Profile
@joekottke
joekottke / dockerfile-from-container
Created August 9, 2018 15:30
Recreate Dockerfile from a container image
#!/bin/bash
curl -s --unix-socket /var/run/docker.sock http:/images/$1/history | jq -r '[.[].CreatedBy] | reverse | .[]' | sed -e 's|/bin/sh -c #(nop) ||' | sed -e 's|/bin/sh -c |RUN |'

Keybase proof

I hereby claim:

  • I am joekottke on github.
  • I am ottoman (https://keybase.io/ottoman) on keybase.
  • I have a public key ASBEluLTgtxoLYFG60KbLo424WFsN_GifBliRhg2jGbjIwo

To claim this, I am signing this object: