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
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
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
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
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
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;
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 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
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
cpuguy83 / Dockerfile
Created Jan 28, 2014
Docker issues#3753 Demo
View Dockerfile
FROM busybox
ADD /tmp/
ENTRYPOINT ["/tmp/"]
cpuguy83 / operating_hour.rb
Created Jan 23, 2014
Time zone parsing from local time
View operating_hour.rb
class OperatingHour
class MissingTimeZoneError < StandardError; end
class MissingTimeStringError < StandardError; end
attr_reader :time_string, :time_zone
def initialize(opts={})
@time_string = opts[:time_string]
@time_zone = opts[:time_zone]
You can’t perform that action at this time.