Add 'laughing-octo/' from commit 'ee815e9ccc120f5d750d8d958c412778e8a77aa0'
git-subtree-dir: laughing-octo git-subtree-mainline:264531c268
git-subtree-split:ee815e9ccc
This commit is contained in:
commit
d59b1af998
17 changed files with 1433 additions and 0 deletions
15
laughing-octo/fedora-busybox/Dockerfile
Normal file
15
laughing-octo/fedora-busybox/Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM fedora
|
||||
|
||||
RUN yum install -y bzip2 glibc-static
|
||||
RUN yum groupinstall -y "Development tools"
|
||||
|
||||
RUN curl http://busybox.net/downloads/busybox-1.22.1.tar.bz2 | tar jx
|
||||
ADD config busybox-1.22.1/.config
|
||||
RUN cd busybox-1.22.1 && \
|
||||
make && \
|
||||
make install && \
|
||||
cd _install && \
|
||||
tar cvzf /busybox.tar.gz .
|
||||
|
||||
#RUN yum install -y ncurses-devel
|
||||
|
12
laughing-octo/fedora-busybox/README.md
Normal file
12
laughing-octo/fedora-busybox/README.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
|
||||
usage
|
||||
=====
|
||||
|
||||
Use this to build a tarball with a static busybox.
|
||||
|
||||
$> docker build -t busybox-build .
|
||||
[...]
|
||||
$> docker run busybox-build zcat /busybox.tar.gz | docker import - my_busybox
|
||||
|
||||
|
1038
laughing-octo/fedora-busybox/config
Normal file
1038
laughing-octo/fedora-busybox/config
Normal file
File diff suppressed because it is too large
Load diff
10
laughing-octo/fedora-docker-registry/Dockerfile
Normal file
10
laughing-octo/fedora-docker-registry/Dockerfile
Normal file
|
@ -0,0 +1,10 @@
|
|||
FROM fedora
|
||||
|
||||
RUN yum install -y --setopt=override_install_langs=en --setopt=tsflags=nodocs docker-registry && rm -rf /var/cache/yum
|
||||
ADD run.sh /srv/run.sh
|
||||
|
||||
VOLUME ["/var/lib/docker-registry"]
|
||||
|
||||
EXPOSE 5000
|
||||
CMD ["/srv/run.sh"]
|
||||
|
24
laughing-octo/fedora-docker-registry/run.sh
Executable file
24
laughing-octo/fedora-docker-registry/run.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ -z "$GUNICORN_WORKERS" ]] ; then
|
||||
GUNICORN_WORKERS=4
|
||||
fi
|
||||
|
||||
if [[ -z "$REGISTRY_ADDRESS" ]] ; then
|
||||
REGISTRY_ADDRESS=0.0.0.0
|
||||
fi
|
||||
|
||||
if [[ -z "$REGISTRY_PORT" ]] ; then
|
||||
REGISTRY_PORT=5000
|
||||
fi
|
||||
|
||||
if [[ -z "$DOCKER_REGISTRY_CONFIG" ]] ; then
|
||||
export DOCKER_REGISTRY_CONFIG=/etc/docker-registry.yml
|
||||
fi
|
||||
|
||||
if [[ -z "$SETTINGS_FLAVOR" ]] ; then
|
||||
export SETTINGS_FLAVOR=local
|
||||
fi
|
||||
|
||||
cd /usr/lib/python2.7/site-packages/docker-registry
|
||||
/usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b ${REGISTRY_ADDRESS}:${REGISTRY_PORT} -w $GUNICORN_WORKERS wsgi:application
|
5
laughing-octo/fedora-mongo/Dockerfile
Normal file
5
laughing-octo/fedora-mongo/Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM fedora
|
||||
RUN yum install --setopt=override_install_langs=en --setopt=tsflags=nodocs --setopt=keepcache=0 -y mongodb-server && mkdir -p /data/db && rm -rf /var/cache/yum
|
||||
EXPOSE 27017 28017
|
||||
VOLUME ["/data/db"]
|
||||
CMD mongod --noprealloc --smallfiles
|
10
laughing-octo/fedora-tomcat7/Dockerfile
Normal file
10
laughing-octo/fedora-tomcat7/Dockerfile
Normal file
|
@ -0,0 +1,10 @@
|
|||
FROM fedora:20
|
||||
|
||||
RUN curl http://mirrors.gigenet.com/apache/tomcat/tomcat-7/v7.0.53/bin/apache-tomcat-7.0.53.tar.gz | tar zx && mv apache-tomcat-7.0.53 tomcat
|
||||
RUN yum install -y java && rm -rf /var/cache/yum
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
VOLUME ["/tomcat/webapps","/tomcat/logs"]
|
||||
|
||||
CMD /tomcat/bin/startup.sh && tail -f /tomcat/logs/catalina.out
|
9
laughing-octo/fedora-varnish/Dockerfile
Normal file
9
laughing-octo/fedora-varnish/Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM fedora
|
||||
|
||||
RUN dnf install -y --setopt=override_install_langs=en --setopt=tsflags=nodocs varnish redhat-rpm-config && rm -rf /var/cache/yum
|
||||
ADD . /srv/
|
||||
|
||||
VOLUME ["/var/lib/varnish"]
|
||||
|
||||
EXPOSE 6081 6082
|
||||
CMD ["/srv/run.sh"]
|
17
laughing-octo/fedora-varnish/README.md
Normal file
17
laughing-octo/fedora-varnish/README.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
== vbatts/fedora-varnish
|
||||
|
||||
Varnish caching daemon
|
||||
|
||||
== vcl
|
||||
|
||||
get your vcl and mount it into place
|
||||
|
||||
docker run -i -t -P -v $(pwd)/foo.vcl:/srv/default.vcl vbatts/fedora-varnish
|
||||
|
||||
== secret
|
||||
|
||||
A secret is generated if /srv/secret is not present. To use your own, bind mount one in.
|
||||
|
||||
docker run -i -t -P -v $(pwd)/secret:/srv/secret vbatts/fedora-varnish
|
||||
|
||||
|
124
laughing-octo/fedora-varnish/default.vcl
Normal file
124
laughing-octo/fedora-varnish/default.vcl
Normal file
|
@ -0,0 +1,124 @@
|
|||
# This is a basic VCL configuration file for varnish. See the vcl(7)
|
||||
# man page for details on VCL syntax and semantics.
|
||||
#
|
||||
# Default backend definition. Set this to point to your content
|
||||
# server.
|
||||
#
|
||||
backend default {
|
||||
.host = "127.0.0.1";
|
||||
.port = "80";
|
||||
}
|
||||
#
|
||||
# Below is a commented-out copy of the default VCL logic. If you
|
||||
# redefine any of these subroutines, the built-in logic will be
|
||||
# appended to your code.
|
||||
# sub vcl_recv {
|
||||
# if (req.restarts == 0) {
|
||||
# if (req.http.x-forwarded-for) {
|
||||
# set req.http.X-Forwarded-For =
|
||||
# req.http.X-Forwarded-For + ", " + client.ip;
|
||||
# } else {
|
||||
# set req.http.X-Forwarded-For = client.ip;
|
||||
# }
|
||||
# }
|
||||
# if (req.request != "GET" &&
|
||||
# req.request != "HEAD" &&
|
||||
# req.request != "PUT" &&
|
||||
# req.request != "POST" &&
|
||||
# req.request != "TRACE" &&
|
||||
# req.request != "OPTIONS" &&
|
||||
# req.request != "DELETE") {
|
||||
# /* Non-RFC2616 or CONNECT which is weird. */
|
||||
# return (pipe);
|
||||
# }
|
||||
# if (req.request != "GET" && req.request != "HEAD") {
|
||||
# /* We only deal with GET and HEAD by default */
|
||||
# return (pass);
|
||||
# }
|
||||
# if (req.http.Authorization || req.http.Cookie) {
|
||||
# /* Not cacheable by default */
|
||||
# return (pass);
|
||||
# }
|
||||
# return (lookup);
|
||||
# }
|
||||
#
|
||||
# sub vcl_pipe {
|
||||
# # Note that only the first request to the backend will have
|
||||
# # X-Forwarded-For set. If you use X-Forwarded-For and want to
|
||||
# # have it set for all requests, make sure to have:
|
||||
# # set bereq.http.connection = "close";
|
||||
# # here. It is not set by default as it might break some broken web
|
||||
# # applications, like IIS with NTLM authentication.
|
||||
# return (pipe);
|
||||
# }
|
||||
#
|
||||
# sub vcl_pass {
|
||||
# return (pass);
|
||||
# }
|
||||
#
|
||||
# sub vcl_hash {
|
||||
# hash_data(req.url);
|
||||
# if (req.http.host) {
|
||||
# hash_data(req.http.host);
|
||||
# } else {
|
||||
# hash_data(server.ip);
|
||||
# }
|
||||
# return (hash);
|
||||
# }
|
||||
#
|
||||
# sub vcl_hit {
|
||||
# return (deliver);
|
||||
# }
|
||||
#
|
||||
# sub vcl_miss {
|
||||
# return (fetch);
|
||||
# }
|
||||
#
|
||||
# sub vcl_fetch {
|
||||
# if (beresp.ttl <= 0s ||
|
||||
# beresp.http.Set-Cookie ||
|
||||
# beresp.http.Vary == "*") {
|
||||
# /*
|
||||
# * Mark as "Hit-For-Pass" for the next 2 minutes
|
||||
# */
|
||||
# set beresp.ttl = 120 s;
|
||||
# return (hit_for_pass);
|
||||
# }
|
||||
# return (deliver);
|
||||
# }
|
||||
#
|
||||
# sub vcl_deliver {
|
||||
# return (deliver);
|
||||
# }
|
||||
#
|
||||
# sub vcl_error {
|
||||
# set obj.http.Content-Type = "text/html; charset=utf-8";
|
||||
# set obj.http.Retry-After = "5";
|
||||
# synthetic {"
|
||||
# <?xml version="1.0" encoding="utf-8"?>
|
||||
# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
# "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
# <html>
|
||||
# <head>
|
||||
# <title>"} + obj.status + " " + obj.response + {"</title>
|
||||
# </head>
|
||||
# <body>
|
||||
# <h1>Error "} + obj.status + " " + obj.response + {"</h1>
|
||||
# <p>"} + obj.response + {"</p>
|
||||
# <h3>Guru Meditation:</h3>
|
||||
# <p>XID: "} + req.xid + {"</p>
|
||||
# <hr>
|
||||
# <p>Varnish cache server</p>
|
||||
# </body>
|
||||
# </html>
|
||||
# "};
|
||||
# return (deliver);
|
||||
# }
|
||||
#
|
||||
# sub vcl_init {
|
||||
# return (ok);
|
||||
# }
|
||||
#
|
||||
# sub vcl_fini {
|
||||
# return (ok);
|
||||
# }
|
26
laughing-octo/fedora-varnish/run.sh
Executable file
26
laughing-octo/fedora-varnish/run.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
source /srv/varnish.params
|
||||
|
||||
if [ ! -f ${VARNISH_SECRET_FILE} ] ; then
|
||||
mkdir -p $(dirname ${VARNISH_SECRET_FILE})
|
||||
uuidgen > ${VARNISH_SECRET_FILE}
|
||||
echo "Generataed a new ${VARNISH_SECRET_FILE}"
|
||||
fi
|
||||
|
||||
/usr/sbin/varnishd \
|
||||
-F \
|
||||
-P /var/run/varnish.pid \
|
||||
-f $VARNISH_VCL_CONF \
|
||||
-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
|
||||
-T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
|
||||
-t $VARNISH_TTL \
|
||||
-w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \
|
||||
-u $VARNISH_USER \
|
||||
-g $VARNISH_GROUP \
|
||||
-S $VARNISH_SECRET_FILE \
|
||||
-s $VARNISH_STORAGE \
|
||||
$DAEMON_OPTS
|
||||
|
39
laughing-octo/fedora-varnish/varnish.params
Normal file
39
laughing-octo/fedora-varnish/varnish.params
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Varnish environment configuration description. This was derived from
|
||||
# the old style sysconfig/defaults settings
|
||||
|
||||
# Set this to 1 to make systemd reload try to switch vcl without restart.
|
||||
RELOAD_VCL=1
|
||||
|
||||
# Main configuration file. You probably want to change it.
|
||||
VARNISH_VCL_CONF=/srv/default.vcl
|
||||
|
||||
# Default address and port to bind to. Blank address means all IPv4
|
||||
# and IPv6 interfaces, otherwise specify a host name, an IPv4 dotted
|
||||
# quad, or an IPv6 address in brackets.
|
||||
# VARNISH_LISTEN_ADDRESS=192.168.1.5
|
||||
VARNISH_LISTEN_PORT=6081
|
||||
|
||||
# Admin interface listen address and port
|
||||
VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
|
||||
VARNISH_ADMIN_LISTEN_PORT=6082
|
||||
|
||||
# Shared secret file for admin interface
|
||||
VARNISH_SECRET_FILE=/srv/secret
|
||||
|
||||
# The minimum and maximum number of worker threads to start
|
||||
VARNISH_MIN_THREADS=5
|
||||
VARNISH_MAX_THREADS=1000
|
||||
|
||||
# Idle timeout for worker threads
|
||||
VARNISH_THREAD_TIMEOUT=120
|
||||
|
||||
# Backend storage specification, see Storage Types in the varnishd(5)
|
||||
# man page for details.
|
||||
VARNISH_STORAGE="file,/var/lib/varnish/varnish_storage.bin,1G"
|
||||
|
||||
# Default TTL used when the backend does not specify one
|
||||
VARNISH_TTL=120
|
||||
|
||||
# User and group for the varnishd worker processes
|
||||
VARNISH_USER=varnish
|
||||
VARNISH_GROUP=varnish
|
14
laughing-octo/subsonic/Dockerfile
Normal file
14
laughing-octo/subsonic/Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
|||
FROM vbatts/slackware
|
||||
MAINTAINER Vincent Batts <vbatts@slackware.com>
|
||||
|
||||
RUN slackpkg install -batch=on -default_answer=y cxxlibs glib2 libffi
|
||||
RUN wget http://www.slackware.com/~alien/slackbuilds/openjdk/pkg64/14.1/openjre-7u51_b31-x86_64-1alien.txz && installpkg openjre-7u51_b31-x86_64-1alien.txz && rm openjre-7u51_b31-x86_64-1alien.txz
|
||||
RUN cd /tmp/ && wget http://downloads.sourceforge.net/project/subsonic/subsonic/4.9/subsonic-4.9-standalone.tar.gz && tar xf subsonic-4.9-standalone.tar.gz && rm subsonic-4.9-standalone.tar.gz
|
||||
|
||||
ADD start.sh /start.sh
|
||||
|
||||
EXPOSE 4040
|
||||
VOLUME ["/data", "/music"]
|
||||
CMD ["/start.sh"]
|
||||
|
||||
# docker run -i -t -v $(pwd)/Music:/music -v $(pwd)/subsonic:/data -P vbatts/subsonic
|
15
laughing-octo/subsonic/start.sh
Executable file
15
laughing-octo/subsonic/start.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
export JAVA_HOME=/usr/lib64/java/jre
|
||||
|
||||
mkdir -p /data /music
|
||||
|
||||
sh /tmp/subsonic.sh \
|
||||
--home=/data \
|
||||
--default-music-folder=/music \
|
||||
--max-memory=${MAX_MEMORY:-100} \
|
||||
--context-path=${CONTEXT_PATH:-/}
|
||||
tail -f /data/*.log
|
||||
|
18
laughing-octo/xterm/Dockerfile.sh
Normal file
18
laughing-octo/xterm/Dockerfile.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
cat <<EOM
|
||||
FROM fedora:latest
|
||||
|
||||
RUN yum install -y xterm
|
||||
#RUN yum update -y && yum clean all
|
||||
|
||||
RUN useradd -m -u $(id -u ${USER}) -G wheel ${USER} && \
|
||||
sed -ri 's/^(%wheel.*)(ALL)$/\1NOPASSWD: \2/' /etc/sudoers
|
||||
|
||||
|
||||
CMD bash -l
|
||||
USER ${USER}
|
||||
ENV HOME ${HOME}
|
||||
WORKDIR ${HOME}
|
||||
EOM
|
||||
|
37
laughing-octo/xterm/Makefile
Normal file
37
laughing-octo/xterm/Makefile
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
COMMAND := xterm
|
||||
IMAGE := $(USER)/$(COMMAND)
|
||||
DOCKER := $(shell which docker)
|
||||
|
||||
default: run
|
||||
|
||||
Dockerfile: Dockerfile.sh
|
||||
sh $< > $@
|
||||
|
||||
build: Dockerfile
|
||||
$(DOCKER) build -t $(IMAGE) .
|
||||
|
||||
run: build
|
||||
$(DOCKER) run \
|
||||
--rm \
|
||||
-it \
|
||||
--hostname="$(shell hostname)-$(IMAGE)" \
|
||||
--env DISPLAY \
|
||||
--env HOME \
|
||||
--env PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin \
|
||||
--env SESSION_MANAGER \
|
||||
--env SSH_AUTH_SOCK \
|
||||
--env XAUTHORITY \
|
||||
--privileged \
|
||||
--user $(USER) \
|
||||
--workdir $(shell pwd) \
|
||||
-v $(HOME):$(HOME) \
|
||||
-v $(SSH_AUTH_SOCK):$(SSH_AUTH_SOCK) \
|
||||
-v /tmp/:/tmp/ \
|
||||
$(IMAGE) \
|
||||
$(COMMAND)
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf *~ Dockerfile
|
||||
|
20
laughing-octo/xterm/README.md
Normal file
20
laughing-octo/xterm/README.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# xterm container!
|
||||
|
||||
## Building
|
||||
|
||||
$> make build
|
||||
|
||||
Since the container maps user name and UID into the image, the Dockerfile.sh is used to generate the Dockerfile.
|
||||
|
||||
## Running
|
||||
|
||||
$> make run
|
||||
|
||||
This cobbles together a docker run command to connect the container to your host's Xorg server.
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
![make run](http://vbatts.fedorapeople.org/docker/docker-xterm.png)
|
||||
|
Loading…
Reference in a new issue