Skip to content

Instantly share code, notes, and snippets.

Fabio Rehm fgrehm

Block or report user

Report or block fgrehm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile


apk2layer flattens an alpine linux package(s) and its dependencies into a standalone tarball.


apk2layer [-mirror] PKGNAME... > layer.tar
View gist:9e7ac7185ffd64c1a91a

Preview build: Container grouping and stack composition

NOTE: this is out of date - refer to

Here is a preview build of two new features we’re working on concurrently: container grouping (docker groups) and stack composition (docker up). Together, they will eventually form a complete replacement for Fig.

View gist:8462539

The error looks like this?

Bundler::GemNotFound: Could not find jumpup-heroku-0.0.1.gem for installation
An error occurred while installing jumpup-heroku (0.0.1), and Bundler cannot continue.
Make sure that `gem install jumpup-heroku -v '0.0.1'` succeeds before bundling.

How to run only the broken integration task:

dergachev /
Last active Jul 13, 2019
Caching debian package installation with docker

TLDR: I now add the following snippet to all my Dockerfiles:

# If host is running squid-deb-proxy on port 8000, populate /etc/apt/apt.conf.d/30proxy
# By default, squid-deb-proxy 403s unknown sources, so apt shouldn't proxy
RUN route -n | awk '/^ {print $2}' > /tmp/host_ip.txt
RUN echo "HEAD /" | nc `cat /tmp/host_ip.txt` 8000 | grep squid-deb-proxy \
  && (echo "Acquire::http::Proxy \"http://$(cat /tmp/host_ip.txt):8000\";" > /etc/apt/apt.conf.d/30proxy) \
  && (echo " DIRECT;" >> /etc/apt/apt.conf.d/30proxy) \
  || echo "No squid-deb-proxy detected on docker host"
#!/usr/bin/env bash
curl --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
View update-gemfile.rb
outdated_gems = `gem outdated`
regex = %r((?<gem>[\w-]+) \((?<old>[\d\.]+) < (?<new>[\d\.]+)\))
gemfile ="./Gemfile")
outdated_gems.each_line do |line|
data = line.match(regex)
gemfile.gsub!(%r(gem '#{data[:gem]}',(\s+)'[^']+'), "gem '#{data[:gem]}',\\1'#{data[:new]}'")
fnichol /
Last active Sep 18, 2019
Auto-enable Local HTTP Caching in Test Kitchen

Auto-enable Local HTTP Caching in Test Kitchen

Note: total experiment and hack, looks nasty, could be awesome:


  • Drop the kitchen.local.yml into $HOME/.kitchen/config.yml
  • Install polipo (with Mac: brew install polipo, with Ubuntu: apt-get install polipo)
  • Drop polipo-start and polipo-console somewhere useful (perhaps $HOME/bin?)
ismell /
Last active Jul 18, 2019 — forked from anonymous/
Scripts to re-create the docker0 bridge and setup a different ip subnet
#!/bin/bash -e
if [[ ! ip link show docker0 ]]; then
ip link add docker0 type bridge
ip addr add "$IFADDR" dev docker0
ip link set docker0 up
iptables -t nat -A POSTROUTING -s "$IFADDR" ! -d "$IFADDR" -j MASQUERADE
You can’t perform that action at this time.