aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker/docker
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/docker/docker')
-rw-r--r--recipes-containers/docker/docker/0001-docker.service-add-clear-linux-oci-runtime.patch26
-rw-r--r--recipes-containers/docker/docker/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch116
-rw-r--r--recipes-containers/docker/docker/docker-registry.service19
-rw-r--r--recipes-containers/docker/docker/docker.init126
-rw-r--r--recipes-containers/docker/docker/docker.service15
-rw-r--r--recipes-containers/docker/docker/hi.Dockerfile7
6 files changed, 309 insertions, 0 deletions
diff --git a/recipes-containers/docker/docker/0001-docker.service-add-clear-linux-oci-runtime.patch b/recipes-containers/docker/docker/0001-docker.service-add-clear-linux-oci-runtime.patch
new file mode 100644
index 0000000..f127726
--- /dev/null
+++ b/recipes-containers/docker/docker/0001-docker.service-add-clear-linux-oci-runtime.patch
@@ -0,0 +1,26 @@
+From 3d8de3552b778d26f6783edebb7e97ed39e93d0c Mon Sep 17 00:00:00 2001
+From: Todor Minchev <todor.minchev@linux.intel.com>
+Date: Tue, 15 Aug 2017 16:09:49 -0700
+Subject: [PATCH] docker.service add clear linux oci runtime
+
+Signed-off-by: Todor Minchev <todor.minchev@linux.intel.com>
+---
+ contrib/init/systemd/docker.service | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/contrib/init/systemd/docker.service b/contrib/init/systemd/docker.service
+index 8bfed93c7..5a730e618 100644
+--- a/contrib/init/systemd/docker.service
++++ b/contrib/init/systemd/docker.service
+@@ -9,7 +9,7 @@ Type=notify
+ # the default is not to use systemd for cgroups because the delegate issues still
+ # exists and systemd currently does not support the cgroup feature set required
+ # for containers run by docker
+-ExecStart=/usr/bin/dockerd -H fd://
++ExecStart=/usr/bin/dockerd -D --add-runtime cor=/usr/bin/cc-oci-runtime.sh --default-runtime=cor -H fd://
+ ExecReload=/bin/kill -s HUP $MAINPID
+ LimitNOFILE=1048576
+ # Having non-zero Limit*s causes performance problems due to accounting overhead
+--
+2.13.2
+
diff --git a/recipes-containers/docker/docker/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch b/recipes-containers/docker/docker/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch
new file mode 100644
index 0000000..240b744
--- /dev/null
+++ b/recipes-containers/docker/docker/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch
@@ -0,0 +1,116 @@
+From de69555afaf05efcdeea7b7c20c6f7b12f3e1bac Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Fri, 20 Jan 2017 11:58:44 -0500
+Subject: [PATCH] context: use golang.org/x/net pkg until we move to go 1.7
+
+In go 1.6 the context.go is not yet integrated and as such we will get
+build errors like:
+
+walwrap.go:4:2: cannot find package "context" in any of:
+...
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ client/README.md | 2 +-
+ client/client.go | 2 +-
+ daemon/info_unix.go | 2 +-
+ integration-cli/docker_api_attach_test.go | 2 +-
+ integration-cli/docker_cli_save_load_unix_test.go | 2 +-
+ vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go | 2 +-
+ vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go | 2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/client/README.md b/client/README.md
+index 059dfb3..9de54aa 100644
+--- a/client/README.md
++++ b/client/README.md
+@@ -8,7 +8,7 @@ For example, to list running containers (the equivalent of `docker ps`):
+ package main
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "fmt"
+
+ "github.com/docker/docker/api/types"
+diff --git a/client/client.go b/client/client.go
+index a9bdab6..95933af 100644
+--- a/client/client.go
++++ b/client/client.go
+@@ -19,7 +19,7 @@ For example, to list running containers (the equivalent of "docker ps"):
+ package main
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "fmt"
+
+ "github.com/docker/docker/api/types"
+diff --git a/daemon/info_unix.go b/daemon/info_unix.go
+index 9c41c0e..57f8a7b 100644
+--- a/daemon/info_unix.go
++++ b/daemon/info_unix.go
+@@ -3,7 +3,7 @@
+ package daemon
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "os/exec"
+ "strings"
+
+diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go
+index d43bf3a..e5802a7 100644
+--- a/integration-cli/docker_api_attach_test.go
++++ b/integration-cli/docker_api_attach_test.go
+@@ -3,7 +3,7 @@ package main
+ import (
+ "bufio"
+ "bytes"
+- "context"
++ "golang.org/x/net/context"
+ "io"
+ "net"
+ "net/http"
+diff --git a/integration-cli/docker_cli_save_load_unix_test.go b/integration-cli/docker_cli_save_load_unix_test.go
+index 22445e5..d0afc8c 100644
+--- a/integration-cli/docker_cli_save_load_unix_test.go
++++ b/integration-cli/docker_cli_save_load_unix_test.go
+@@ -3,7 +3,7 @@
+ package main
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "fmt"
+ "io/ioutil"
+ "os"
+diff --git a/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
+index 6b3295a..cbfcf7e 100644
+--- a/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
++++ b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
+@@ -1,7 +1,7 @@
+ package logbroker
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "fmt"
+ "strings"
+ "sync"
+diff --git a/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go b/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
+index 5a6c71a..efe5921 100644
+--- a/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
++++ b/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
+@@ -1,7 +1,7 @@
+ package storage
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "io"
+ "io/ioutil"
+ "os"
+--
+2.7.4
+
diff --git a/recipes-containers/docker/docker/docker-registry.service b/recipes-containers/docker/docker/docker-registry.service
new file mode 100644
index 0000000..7b4bc46
--- /dev/null
+++ b/recipes-containers/docker/docker/docker-registry.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=docker private registry service
+After=docker.service
+
+[Service]
+ExecStartPre=-/usr/bin/docker kill registry
+ExecStartPre=-/usr/bin/docker rm registry
+ExecStart=/usr/bin/docker run --name registry -v /mirror/registry:/tmp/ -p 5000:5000 \
+ -e "STANDALONE=true" \
+ -e "MIRROR_SOURCE=https://registry-1.docker.io" \
+ -e "MIRROR_SOURCE_INDEX=https://index.docker.io" \
+ -e "SETTINGS_FLAVOR=local" \
+ registry
+ExecStop=-/usr/bin/docker stop registry
+Restart=always
+RestartSec=10s
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-containers/docker/docker/docker.init b/recipes-containers/docker/docker/docker.init
new file mode 100644
index 0000000..9c01c75
--- /dev/null
+++ b/recipes-containers/docker/docker/docker.init
@@ -0,0 +1,126 @@
+#!/bin/sh
+#
+# /etc/rc.d/init.d/docker
+#
+# Daemon for docker.com
+#
+# chkconfig: 2345 95 95
+# description: Daemon for docker.com
+
+### BEGIN INIT INFO
+# Provides: docker
+# Required-Start: $network cgconfig
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop docker
+# Description: Daemon for docker.com
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+prog="docker"
+unshare=/usr/bin/unshare
+exec="/usr/bin/$prog"
+pidfile="/var/run/$prog.pid"
+lockfile="/var/lock/subsys/$prog"
+logfile="/var/log/$prog"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+
+ check_for_cleanup
+
+ if ! [ -f $pidfile ]; then
+ printf "Starting $prog:\t"
+ echo "\n$(date)\n" >> $logfile
+ "$unshare" -m -- $exec -d $other_args &>> $logfile &
+ pid=$!
+ touch $lockfile
+ # wait up to 10 seconds for the pidfile to exist. see
+ # https://github.com/docker/docker/issues/5359
+ tries=0
+ while [ ! -f $pidfile -a $tries -lt 10 ]; do
+ sleep 1
+ tries=$((tries + 1))
+ done
+ success
+ echo
+ else
+ failure
+ echo
+ printf "$pidfile still exists...\n"
+ exit 7
+ fi
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+check_for_cleanup() {
+ if [ -f ${pidfile} ]; then
+ /bin/ps -fp $(cat ${pidfile}) > /dev/null || rm ${pidfile}
+ fi
+}
+
+case "$1" in
+ start)
+ $1
+ ;;
+ stop)
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ status
+ ;;
+ condrestart|try-restart)
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+
+exit $?
diff --git a/recipes-containers/docker/docker/docker.service b/recipes-containers/docker/docker/docker.service
new file mode 100644
index 0000000..eaa3319
--- /dev/null
+++ b/recipes-containers/docker/docker/docker.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Docker Application Container Engine
+Documentation=http://docs.docker.com
+After=network.target docker.socket
+Requires=docker.socket
+
+[Service]
+ExecStart=/usr/bin/docker daemon -H fd:// --registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs
+MountFlags=slave
+LimitNOFILE=1048576
+LimitNPROC=1048576
+LimitCORE=infinity
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-containers/docker/docker/hi.Dockerfile b/recipes-containers/docker/docker/hi.Dockerfile
new file mode 100644
index 0000000..9af6805
--- /dev/null
+++ b/recipes-containers/docker/docker/hi.Dockerfile
@@ -0,0 +1,7 @@
+FROM debian
+
+MAINTAINER amy.fong@windriver.com
+
+RUN apt-get update && apt-get install figlet
+
+ENTRYPOINT [ "/usr/bin/figlet", "hi" ]