<repo_name>pmav99/dockerfiles<file_sep>/docker/master/Dockerfile
FROM alpine:3.2

RUN apk add --update \
		curl \
	&& rm -rf /var/cache/apk/*

ENV DOCKER_VERSION 1.9.0-dev
ENV DOCKER_URL https://master.dockerproject.org/linux/amd64/docker-1.9.0-dev
ENV DOCKER_SHA256 4a9fd9033eda4c6dbe32707bc3da477f56fd43c39d8f5f553063e60afcad8cdd

RUN curl -fSL "${DOCKER_URL}" -o /usr/local/bin/docker \
	&& echo "${DOCKER_SHA256}  /usr/local/bin/docker" | sha256sum -c - \
	&& chmod +x /usr/local/bin/docker

COPY docker-entrypoint.sh /usr/local/bin/

ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["sh"]
<file_sep>/apache2/Dockerfile
FROM debian:jessie

RUN apt-get update && apt-get install -y apache2

# let's copy a few of the settings from /etc/init.d/apache2
ENV APACHE_CONFDIR /etc/apache2
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
# and then a few more from $APACHE_CONFDIR/envvars itself
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_PID_FILE $APACHE_RUN_DIR/apache2.pid
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_LOG_DIR /var/log/apache2
ENV LANG C

# ...
RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR

# make CustomLog (access log) go to stdout instead of files
#  and ErrorLog to stderr
RUN find "$APACHE_CONFDIR" -type f -exec sed -ri ' \
	s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \
	s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \
' '{}' ';'

EXPOSE 80

CMD ["apache2", "-DFOREGROUND"]

# I really don't like Apache.  Irrationally.
<file_sep>/qemu/start-qemu
#!/bin/bash
set -e

# main available options:
#   QEMU_CPU=n    (cores)
#   QEMU_RAM=nnn  (megabytes)
#   QEMU_HDA      (filename)
#   QEMU_HDA_SIZE (bytes, suffixes like "G" allowed)
#   QEMU_CDROM    (filename)
#   QEMU_BOOT     (-boot)

hostArch="$(uname -m)"
qemuArch="${QEMU_ARCH:-$hostArch}"
qemu="${QEMU_BIN:-qemu-system-$qemuArch}"
qemuArgs=()

if [ -e /dev/kvm ]; then
	qemuArgs+=( -enable-kvm )
elif [ "$hostArch" = "$qemuArch" ]; then
	echo >&2
	echo >&2 'warning: /dev/kvm not found'
	echo >&2 '  PERFORMANCE WILL SUFFER'
	echo >&2 '  (hint: docker run --device /dev/kvm ...)'
	echo >&2
	sleep 3
fi

qemuArgs+=( -smp "${QEMU_CPU:-1}" )
qemuArgs+=( -m "${QEMU_RAM:-512}" )

if [ "$QEMU_HDA" ]; then
	if [ ! -f "$QEMU_HDA" -o ! -s "$QEMU_HDA" ]; then
		(
			set -x
			qemu-img create -f qcow2 -o preallocation=off "$QEMU_HDA" "${QEMU_HDA_SIZE:-8G}"
		)
	fi
	qemuArgs+=( -hda "$QEMU_HDA" )
fi

if [ "$QEMU_CDROM" ]; then
	qemuArgs+=( -cdrom "$QEMU_CDROM" )
fi

if [ "$QEMU_BOOT" ]; then
	qemuArgs+=( -boot "$QEMU_BOOT" )
fi

qemuArgs+=(
	-net nic
	-net user,hostname="$(hostname)",hostfwd=tcp:':22'-':22'
	-vnc ':0'
	-serial stdio
	"$@"
)

set -x
exec "$qemu" "${qemuArgs[@]}"
<file_sep>/speedtest/Dockerfile
FROM python:3-slim

ENV SPEEDTEST_CLI_VERSION 0.3.2

RUN pip install speedtest-cli==$SPEEDTEST_CLI_VERSION

COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]

CMD ["speedtest-cli"]
<file_sep>/xen-orchestra/Dockerfile
FROM node

# see https://github.com/vatesfr/xo/blob/master/installation.md

RUN apt-get update && apt-get install -y ruby-compass

ENV XO_REF v3.4.0

RUN mkdir -p /usr/src/xo
WORKDIR /usr/src/xo
RUN git clone -b $XO_REF git://github.com/vatesfr/xo-server.git
RUN git clone -b $XO_REF git://github.com/vatesfr/xo-web.git

RUN cd xo-server && npm install
RUN cd xo-server && cp config/local.yaml.dist config/local.yaml

RUN cd xo-web && npm install
RUN cd xo-web && ./gulp --production

ADD local.yaml /usr/src/xo/xo-server/config/

EXPOSE 80
#CMD ["./xo-server/xo-server"]
# see https://github.com/vatesfr/xo-server/pull/28
CMD ["sh", "-eu", "./xo-server/xo-server"]
<file_sep>/docker/master/git/Dockerfile
FROM tianon/docker-master:master

RUN apk add --update \
		git \
		openssh-client \
	&& rm -rf /var/cache/apk/*
<file_sep>/beets/Dockerfile
FROM python:2

ENV BEETS_VERSION 1.3.14

RUN pip install beets==$BEETS_VERSION

CMD ["beet"]
<file_sep>/golang/Dockerfile
FROM debian:wheezy

# necessary for building Go
RUN apt-get update && apt-get install -y build-essential curl

# these are useful for "go get"
RUN apt-get update && apt-get install -y bzr git mercurial

RUN curl -sSL http://golang.org/dl/go1.3.src.tar.gz \
	| tar -v -C /usr/src -xz
WORKDIR /usr/src/go

# see http://golang.org/doc/install/source#environment
ENV GOLANG_CROSSPLATFORMS \
	darwin/386 darwin/amd64 \
	dragonfly/386 dragonfly/amd64 \
	freebsd/386 freebsd/amd64 freebsd/arm \
	linux/386 linux/amd64 linux/arm \
	nacl/386 nacl/amd64p32 \
	netbsd/386 netbsd/amd64 netbsd/arm \
	openbsd/386 openbsd/amd64 \
	plan9/386 plan9/amd64 \
	solaris/amd64 \
	windows/386 windows/amd64

# (set an explicit GOARM of 5 for maximum ARM compatibility)
ENV GOARM 5

RUN bash -xec '\
		cd src; \
		for platform in $GOLANG_CROSSPLATFORMS; do \
			GOOS=${platform%/*} \
			GOARCH=${platform##*/} \
			./make.bash --no-clean 2>&1; \
		done \
	'

ENV PATH /usr/src/go/bin:$PATH

RUN mkdir -p /go/src
ENV GOPATH /go
ENV PATH /go/bin:$PATH
WORKDIR /go
<file_sep>/dind/Dockerfile
FROM debian:jessie

RUN apt-get update && apt-get install -y --no-install-recommends aufs-tools btrfs-tools ca-certificates curl e2fsprogs iptables procps xz-utils && rm -rf /var/lib/apt/lists/*

RUN curl -fSL https://get.docker.io/builds/Linux/x86_64/docker-latest -o /usr/bin/docker \
	&& chmod +x /usr/bin/docker \
	&& docker -v

RUN curl -fSL https://raw.githubusercontent.com/docker/docker/master/hack/dind -o /dind \
	&& chmod +x /dind

VOLUME /var/lib/docker
ENTRYPOINT ["/dind"]
CMD ["bash"]
<file_sep>/exim4/Dockerfile
FROM debian:jessie

RUN apt-get update && apt-get install -y exim4-daemon-light

COPY set-exim4-update-conf /usr/local/bin/
COPY entrypoint.sh /usr/local/bin/
ENTRYPOINT ["entrypoint.sh"]

EXPOSE 25
CMD ["exim", "-bd", "-v"]
<file_sep>/github-pages/Dockerfile
FROM debian:sid

RUN apt-get update && apt-get install -y \
		build-essential \
		python-pygments \
		ruby \
		ruby-dev

RUN gem install --no-rdoc --no-ri github-pages

ONBUILD ADD . /blog
ONBUILD WORKDIR /blog
ONBUILD EXPOSE 4000
ONBUILD CMD ["jekyll", "serve"]
<file_sep>/irssi/Dockerfile
FROM debian:sid

RUN apt-get update && apt-get install -y ca-certificates irssi libwww-perl wget

RUN useradd --create-home user
USER user
ENV HOME /home/user
WORKDIR /home/user
RUN mkdir -p .irssi

ENV LANG C.UTF-8

CMD ["irssi"]
<file_sep>/debian/ubuntu-devel/sync.sh
#!/bin/bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"

set -x
rsync -avP ../devel/ ./
awk '
	$1 == "FROM" { $2 = "ubuntu-debootstrap:devel" }
	/incoming.debian.org/ { next }
	{ print }
' ../devel/Dockerfile > Dockerfile
<file_sep>/jenkins/Dockerfile
FROM debian:jessie

RUN apt-get update \
	&& apt-get install -y --no-install-recommends \
		ca-certificates curl \
		\
		git \
	&& rm -rf /var/lib/apt/lists/*

# grab gosu for easy step-down from root
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys <KEY>
ENV GOSU_VERSION 1.4
RUN curl -o /usr/local/bin/gosu -fSL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(dpkg --print-architecture)" \
	&& curl -o /usr/local/bin/gosu.asc -fSL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(dpkg --print-architecture).asc" \
	&& gpg --verify /usr/local/bin/gosu.asc \
	&& rm /usr/local/bin/gosu.asc \
	&& chmod +x /usr/local/bin/gosu

RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 150FDE3F7787E7D11EF4E12A9B7D32F2D50582E6
RUN echo 'deb http://pkg.jenkins-ci.org/debian binary/' > /etc/apt/sources.list.d/jenkins.list

ENV JENKINS_VERSION 1.627

RUN apt-get update && apt-get install -y --no-install-recommends \
		jenkins=${JENKINS_VERSION} \
	&& rm -rf /var/lib/apt/lists/*

ENV JENKINS_HOME /var/lib/jenkins
RUN mkdir -p "$JENKINS_HOME" && chown -R jenkins:jenkins "$JENKINS_HOME"
VOLUME $JENKINS_HOME

EXPOSE 8080
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["java", "-jar", "/usr/share/jenkins/jenkins.war"]
<file_sep>/syncthing/Dockerfile
FROM debian:jessie

RUN useradd --create-home user

RUN apt-get update && apt-get install -y ca-certificates --no-install-recommends && rm -rf /var/lib/apt/lists/*

# gpg: key 00654A3E: public key "Syncthing Release Management <<EMAIL>>" imported
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 37C84554E7E0A261E4F76E1ED26E6ED000654A3E

ENV SYNCTHING_VERSION 0.11.23

RUN set -x \
	&& apt-get update && apt-get install -y curl --no-install-recommends && rm -rf /var/lib/apt/lists/* \
	&& tarball="syncthing-linux-amd64-v${SYNCTHING_VERSION}.tar.gz" \
	&& curl -fSL "https://github.com/syncthing/syncthing/releases/download/v${SYNCTHING_VERSION}/"{"$tarball",sha1sum.txt.asc} -O \
	&& apt-get purge -y --auto-remove curl \
	&& gpg --verify sha1sum.txt.asc \
	&& grep -E " ${tarball}\$" sha1sum.txt.asc | sha1sum -c - \
	&& rm sha1sum.txt.asc \
	&& tar -xvf "$tarball" --strip-components=1 "$(basename "$tarball" .tar.gz)"/syncthing \
	&& mv syncthing /usr/local/bin/syncthing \
	&& rm "$tarball"

USER user
CMD ["syncthing"]
<file_sep>/mongodb-mms/update.sh
#!/bin/bash
set -e

current="$(HEAD -E 'https://mms.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_latest_amd64.deb' | grep -m1 '^Location:' | cut -d_ -f2)"

set -x
sed -ri 's/^(ENV MMS_VERSION) .*/\1 '"$current"'/' Dockerfile
<file_sep>/mongodb-server/Dockerfile
FROM debian:unstable

RUN apt-get update && apt-get install -yq mongodb-server

# we need stdout logging and binding on 0.0.0.0
RUN sed -i ' \
		s/^logpath/#logpath/g; \
		s/^bind_ip.*$/bind_ip = 0.0.0.0/g \
	' /etc/mongodb.conf

VOLUME /var/lib/mongodb
CMD ["mongod", "--config", "/etc/mongodb.conf"]
EXPOSE 27017
<file_sep>/mongodb-mms/Dockerfile
FROM debian:wheezy

RUN apt-get update && apt-get install -y curl logrotate

ENV MMS_VERSION 3.4.0.190-1

# see https://mms.mongodb.com/settings/monitoring-agent
# click on "Ubuntu 12.04+"
RUN curl -sSL https://mms.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_${MMS_VERSION}_amd64.deb -o mms.deb \
	&& dpkg -i mms.deb \
	&& rm mms.deb

ADD docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]

USER mongodb-mms-agent
CMD ["mongodb-mms-monitoring-agent", "-conf", "/etc/mongodb-mms/monitoring-agent.config"]
