Skip to content

Instantly share code, notes, and snippets.

@jordansissel
jordansissel / 1-output.txt
Last active November 10, 2021 14:28
Convert curl|bash to an rpm with Docker and FPM
% docker build -t rust .
...
# Export the image to tarball, which itself contains tarballs and a manifest.json
% docker save -o rust.tar rust
# Extract the last layer
# tar's -O flag extracts a single entry from the tarball.
# The file we want is the last "Layer" in the manifest.json
% tar -xf rust.tar -O $(tar -xf rust.tar -O manifest.json | jq -r '.[].Layers[-1]') > curlbash.tar
@adamhjk
adamhjk / Guardfile
Last active December 17, 2015 03:19
A Guardfile with inline support for test-kitchen, before we turn it into a gem.
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
require 'guard/guard'
require 'mixlib/shellout'
module ::Guard
class Kitchen < ::Guard::Guard
def start
::Guard::UI.info("Guard::Kitchen is starting")