Skip to content

Instantly share code, notes, and snippets.

Hoping I don't break anything

Brian Goff cpuguy83

Hoping I don't break anything
Block or report user

Report or block cpuguy83

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
cpuguy83 / docker-events.rb
Created Feb 1, 2014
High performance Docker events api event handler prototype
View docker-events.rb
#!/usr/bin/env ruby
require 'bundler/setup'
require 'http'
require 'celluloid'
require 'celluloid/io'
require 'json'
class Event
View ldap.conf
description "LDAP"
start on filesystem and started docker
stop on runlevel [!2345]
respawn limit 5 5
/usr/bin/docker start -a ldap
end script
View skydns start
post-start script
while [ -z $(docker ps | grep skydns) ]; do
echo "Waiting for DNS container to start"
sleep 1
ip=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' skydns)
until `curl --output /dev/null --silent --head --connect-timeout 3 http://$ip:8080/skydns/services/`; do
echo "Waiting for DNS service to be ready for connections"
sleep 3
View gist:9230891
server {
listen 443 spdy;
server_name *;
ssl on;
ssl_certificate /etc/ssl/ssl.crt;
ssl_certificate_key /etc/ssl/ssl.key;
location / {
proxy_pass http://my-backend-host;
cpuguy83 / mail.conf
Created Mar 6, 2014
docker upstart integration stuff
View mail.conf
description "Mail"
start on started docker
stop on runlevel [!2345] or stopping docker
respawn limit 5 5
/usr/bin/docker start -a mail
end script
cpuguy83 /
Last active Aug 29, 2015
More easily attach to container using nsinit and container name
attach_container() {
id=$(docker inspect --format '{{ .ID }}' $1)
cd /var/lib/docker/execdriver/native/${id}
if [ ! -z $2 ]; then
View gist:7b5dadde0c1ad0fe7df3
docker run -d -v /var/lib/postgresql --entrypoint /bin/echo --name data-postres cpuguy83/postgres Data-only container for postgres
docker run --rm -v /path/to/jar:/myjar.jar --volumes-from data-postgres --entrypoint /bin/bash cpuguy83/java -c "java /myjar.jar"
docker run -d --name postgres --volumes-from data-postgres cpuguy83/postgres
View gist:b7748f3fbe957a699e3b
---> Making bundle: binary (in bundles/1.1.0-dev/binary)
Created binary: /go/src/
ln: failed to create symbolic link '/go/src/': Read-only file system
[2014-07-07 12:11:38 -0400 EDT] 37b6470e8b6b03cc4c68554735e9685b7bec7dc070eaf8ece4c0ff77f1bee01d: (from docker:fix_gh#6856_add_pass_unpause_events) die
[2014-07-07 12:11:38 -0400 EDT] 37b6470e8b6b03cc4c68554735e9685b7bec7dc070eaf8ece4c0ff77f1bee01d: (from docker:fix_gh#6856_add_pass_unpause_events) destroy
make: *** [test] Error 1
cpuguy83 / logforwarder.go
Last active Aug 29, 2015
libswarm logger demo
View logforwarder.go
package backends
import (
View Dockerfile
FROM debian
You can’t perform that action at this time.