Skip to content

Instantly share code, notes, and snippets.

View crosbymichael's full-sized avatar

Michael Crosby crosbymichael

View GitHub Profile
# Builder file for sentry
#
FROM ubuntu
MAINTAINER Michael Crosby
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade
m := map[string]map[string]func(*Server, float64, http.ResponseWriter, *http.Request, map[string]string) error{
"GET": {
"/auth": getAuth,
"/version": getVersion,
"/info": getInfo,
"/images/json": getImagesJson,
"/images/viz": getImagesViz,
"/images/search": getImagesSearch,
"/images/{name:.*}/history": getImagesHistory, "/images/{name:.*}/json": getImagesByName,
"/containers/ps": getContainersJson,
func postImagesCreate(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
if err := parseForm(r); err != nil {
return err
}
src := r.Form.Get("fromSrc")
image := r.Form.Get("fromImage")
tag := r.Form.Get("tag")
repo := r.Form.Get("repo")
sf := utils.NewStreamFormatter(version > 1.0)
@crosbymichael
crosbymichael / Dockerfile
Last active January 8, 2022 13:47
Docker with supervisor
FROM ubuntu
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade
RUN apt-get install -y openssh-server supervisor
ADD sshd.conf /etc/supervisor/conf.d/sshd.conf
RUN mkdir -p /var/run/sshd
FROM ubuntu
RUN apt-get update
ADD test /test
ENTRYPOINT /test
CMD -help
# Dockerfile for sentry
FROM ubuntu
MAINTAINER Michael Crosby
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade
# Install a rethinkdb node. The node will be accessible via HTTP on port 8100. The port can be changed.
# After creating the image you can run:
#
# docker run -i -t rethinkdb
#
# Which will run with database storage in /var/rethinkdb on the containers file system
#
# To expose a system directory on the host:
#
@crosbymichael
crosbymichael / notification.go
Last active June 2, 2018 15:03
Programatic events for docker
package main
import (
"encoding/json"
"io"
"log"
"net/http"
)
type Event struct {
@crosbymichael
crosbymichael / Dockerfile
Created September 10, 2013 17:54
Golang CrossCompiling image
# Dockerfile for go 1.1.2 cross compile
FROM ubuntu
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y mercurial git-core

LINUX

└[~GOPATH/src/github.com/dotcloud/docker/docker]> sudo ./docker -d -H 0.0.0.0:4243 Loading containers: done. 2013/09/13 21:18:34 WARNING: You are running linux kernel version 3.2.0-23-generic, which might be unstable running docker. Please upgrade your kernel to 3.8.0. 2013/09/13 21:18:34 /!\ DON'T BIND ON ANOTHER IP ADDRESS THAN 127.0.0.1 IF YOU DON'T KNOW WHAT YOU'RE DOING /!
2013/09/13 21:18:34 Listening for HTTP on 0.0.0.0:4243 (tcp) 2013/09/13 21:18:47 GET /v1.5/containers/json