summaryrefslogtreecommitdiff
path: root/files/docker-registry.ubuntu
diff options
context:
space:
mode:
Diffstat (limited to 'files/docker-registry.ubuntu')
-rw-r--r--files/docker-registry.ubuntu44
1 files changed, 44 insertions, 0 deletions
diff --git a/files/docker-registry.ubuntu b/files/docker-registry.ubuntu
new file mode 100644
index 0000000..cd2e676
--- /dev/null
+++ b/files/docker-registry.ubuntu
@@ -0,0 +1,44 @@
+#!/bin/sh
+set -e
+
+### BEGIN INIT INFO
+# Provides: docker-registry
+# Required-Start: $docker
+# Required-Stop: $docker
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Docker Registry
+# Description:
+# Docker Registry
+### END INIT INFO
+
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
+
+do_start() {
+ docker-compose -f /root/docker-registry/docker-compose.yaml up -d
+}
+
+do_stop() {
+ docker-compose -f /root/docker-registry/docker-compose.yaml stop
+ docker-compose -f /root/docker-registry/docker-compose.yaml rm -f
+}
+
+do_status() {
+ docker-compose -f /root/docker-registry/docker-compose.yaml ps
+}
+
+case $1 in
+ start*)
+ do_start
+ ;;
+ stop*)
+ do_stop
+ ;;
+ restart*)
+ do_stop
+ do_start
+ ;;
+ status*)
+ do_status
+ ;;
+esac