Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am fgrehm on github.
  • I am fgrehm (https://keybase.io/fgrehm) on keybase.
  • I have a public key ASD-JvHBz59Ab66GlN-q-C06vc7mhnuh4-1qLt2AAYZitgo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am fgrehm on github.
  • I am fgrehm (https://keybase.io/fgrehm) on keybase.
  • I have a public key ASBS1R4n4du4znaDFvsreIfQr3mJ3x4mT_veoY4o3qUDfgo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am fgrehm on github.
  • I am fgrehm (https://keybase.io/fgrehm) on keybase.
  • I have a public key whose fingerprint is 3C39 3ABD 6DDE 83DF 66EA 245A DEAF 326E 2F12 76F2

To claim this, I am signing this object:

View debian.sh
#!/bin/bash
##################################################################################
# 1 - Create the base container
SUITE=squeeze
RELEASE=$SUITE
sudo lxc-create -n ${RELEASE}-base -t debian
rootfs="/var/lib/lxc/${RELEASE}-base/rootfs"
@fgrehm
fgrehm / Dockerfile
Created Jun 5, 2013
OpenJDK 7 JRE Dockerfile
View Dockerfile
# OpenJDK 7 JRE
#
# VERSION 0.0.1
FROM base
MAINTAINER Fabio Rehm "fgrehm@gmail.com"
RUN apt-get update
RUN apt-get install -y openjdk-7-jre-headless
@fgrehm
fgrehm / Dockerfile
Created Jun 5, 2013
ElasticSearch Dockerfile
View Dockerfile
# ElasticSearch 0.90.0
#
# VERSION 0.0.1
FROM fgrehm/openjdk7
MAINTAINER Fabio Rehm "fgrehm@gmail.com"
RUN apt-get install -y wget
RUN wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.0.deb -O /tmp/elasticsearch.deb -q
@fgrehm
fgrehm / Vagrantfile
Last active Dec 16, 2015
VBox + LXC
View Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "quantal64"
config.vm.network :private_network, ip: "192.168.50.23"
config.vm.define :vbox do |vbox_config|
vbox_config.vm.network :forwarded_port, guest: 3000, host: 3001
vbox_config.vm.provision :shell, inline:
# vagrant-lxc required dependencies and vagrant itself
'sudo apt-get install -y redir lxc &&
View psqlfix.sh
if ! $(psql template1 -c 'SHOW SERVER_ENCODING' | grep -q UTF8); then
psql postgres -c "update pg_database set datallowconn = TRUE where datname = 'template0';"
psql template0 -c "update pg_database set datistemplate = FALSE where datname = 'template1';"
psql template0 -c "drop database template1;"
psql template0 -c "create database template1 with template = template0 encoding = 'UTF8';"
psql template0 -c "update pg_database set datistemplate = TRUE where datname = 'template1';"
psql template1 -c "update pg_database set datallowconn = FALSE where datname = 'template0';"
fi
@fgrehm
fgrehm / gist:5424514
Last active Dec 16, 2015
Vagrant + Docker notes
View gist:5424514

To kick off the provider would be nice to have the big picture of out how Vagrant features / commands map to docker "stuff". These are thoughts about how the integration might look like under the hood:


vagrant up

  • how can we tell docker to "just start" a container? "docker start base" would start the base image right?
  • would probably need to commit the base "box" image and interact with that
  • would it make sense to have a "commandless" docker run -d <image>?
View en.yml
en:
activemodel:
errors:
messages:
invalid_url: "must be a valid URL"
You can’t perform that action at this time.