Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@erikh
erikh / dev.rb
Created October 31, 2016 23:10
from "ubuntu"
myuser = "erikh"
homedir = "/home/#{myuser}"
packages = %w[
man
ack-grep
zsh
tmux
build-essential

Box: A Next-Generation Builder for Docker Images Build Status

Box is a builder for docker that gives you the power of mruby, a limited, embeddable ruby. It allows for notions of conditionals, loops, and data structures for use within your builder plan. If you've written a Dockerfile before, writing a box build plan is easy.

  • Unique general features:
    • mruby syntax
  • filtering of keywords to secure builds

mruby Library for Go Build Status

go-mruby provides mruby bindings for Go. This allows Go applications to run a lightweight embedded Ruby VM. Using the mruby library, Go applications can call Ruby code, and Ruby code can call Go code (that is properly exposed)!

At the time of writing, this is the most comprehensive mruby library for Go by far. It is also the only mruby library for Go that enables exposing Go functions to Ruby as well as being able to generically convert complex

@erikh
erikh / lm.go
Created October 18, 2016 03:44
package main
import (
"fmt"
"io/ioutil"
"os"
"golang.org/x/sys/unix"
)
package builder
import (
"archive/tar"
"bufio"
"context"
"crypto/sha512"
"encoding/hex"
"encoding/json"
"errors"
package executor
import "io"
// Hook is a hook used in commit calls
type Hook func(b *Builder, id string) (string, error)
// Executor execs
type Executor interface {
User() string
from "ubuntu"
myuser = "erikh"
homedir = "/home/#{myuser}"
packages = %w[
man
ack-grep
zsh
tmux
build-essential
from "golang"
packages = %w[
build-essential
g++
git
wget
curl
ruby
bison
from "ubuntu"
myuser = "erikh"
homedir = "/home/#{myuser}"
packages = %w[
ack-grep
zsh
tmux
build-essential
vim-nox
from "ubuntu"
myuser = "erikh"
homedir = "/home/#{myuser}"
packages = %w[
ack-grep
zsh
tmux
build-essential