aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-04-21 20:14:04 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-04-21 20:15:06 +0200
commit472c7c7ab5ee8d0739168005be452fcbec9a8d8e (patch)
tree1803fa8675082d8bf4ba1c08737c12d96b0565ad
parent82e559936bf930663f4eb53eccd455168ac76ada (diff)
downloadaports-472c7c7ab5ee8d0739168005be452fcbec9a8d8e.tar.bz2
aports-472c7c7ab5ee8d0739168005be452fcbec9a8d8e.tar.xz
community/docker-registry: precreate data dir and improve config
-rw-r--r--community/docker-registry/APKBUILD15
-rw-r--r--community/docker-registry/config-example.patch19
2 files changed, 29 insertions, 5 deletions
diff --git a/community/docker-registry/APKBUILD b/community/docker-registry/APKBUILD
index 76fe18da62..8b0941b272 100644
--- a/community/docker-registry/APKBUILD
+++ b/community/docker-registry/APKBUILD
@@ -2,18 +2,19 @@
pkgname=docker-registry
pkgver=2.6.1
-pkgrel=1
+pkgrel=2
pkgdesc="An implementation of the Docker Registry HTTP API V2 for use with docker 1.6+"
url="https://github.com/docker/distribution"
arch="x86 x86_64"
license="ASL-2.0"
makedepends="git go"
install="$pkgname.pre-install"
-pkguserss="docker-registry"
+pkgusers="docker-registry"
pkggroups="docker-registry"
subpackages="$pkgname-dbg"
source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz
- docker-registry.initd"
+ docker-registry.initd
+ config-example.patch"
builddir="$srcdir/distribution-$pkgver"
prepare() {
@@ -57,8 +58,12 @@ package() {
"$pkgdir"/usr/share/licenses/$pkgname || return 1
install -D -m 755 "$srcdir"/$pkgname.initd \
- "$pkgdir"/etc/init.d/$pkgname
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+
+ install -d -m 750 -o $pkgusers -g $pkggroups \
+ "$pkgdir"/var/lib/$pkgname
}
sha512sums="a2175cb5ab049599e1bdae7026dc84e14b79883eca3ceaafda54497a1743103f125f65fa3922c003363dd86aa1422f539aff8b17746b9768968fef757e931c36 docker-registry-2.6.1.tar.gz
-96100a4de311afa19d293a3b8a63105e1fcdf49258aa8b1752befd389e6b4a2b1f70711341ea011b450d4468bd37dbd07a393ffab3b9aa1b2213cf0fdd915904 docker-registry.initd"
+96100a4de311afa19d293a3b8a63105e1fcdf49258aa8b1752befd389e6b4a2b1f70711341ea011b450d4468bd37dbd07a393ffab3b9aa1b2213cf0fdd915904 docker-registry.initd
+5a38f4d3f0ee5cd00c0a5ced744eb5b29b839da5921adea26c5de3eb88b6b2626a7ba29b1ab931e5f8fbfafbed8c94cb972a58737ec0c0a69cf515c32139e387 config-example.patch"
diff --git a/community/docker-registry/config-example.patch b/community/docker-registry/config-example.patch
new file mode 100644
index 0000000000..b07c96db2a
--- /dev/null
+++ b/community/docker-registry/config-example.patch
@@ -0,0 +1,19 @@
+--- a/cmd/registry/config-example.yml
++++ b/cmd/registry/config-example.yml
+@@ -6,7 +6,7 @@
+ cache:
+ blobdescriptor: inmemory
+ filesystem:
+- rootdirectory: /var/lib/registry
++ rootdirectory: /var/lib/docker-registry
+ http:
+ addr: :5000
+ headers:
+@@ -16,3 +16,7 @@
+ enabled: true
+ interval: 10s
+ threshold: 3
++
++# Uncomment to use this Registry as pull-through cache for DockerHub.
++#proxy:
++# remoteurl: https://registry-1.docker.io