diff --git a/Dockerfile b/Dockerfile index 3c321fd..56026fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM fedora:25 +FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0.1 RELEASE=1 ARCH=x86_64 -LABEL BZComponent="etcd-docker" \ - Name="$FGC/etcd" \ - Version="$VERSION" \ - Release="$RELEASE" \ - Architecture="$ARCH" \ - Summary="A key-value store for shared configuration and service discovery." \ +ENV VERSION=0.1 RELEASE=19 ARCH=x86_64 +LABEL com.redhat.component="etcd" \ + name="$FGC/etcd" \ + version="$VERSION" \ + release="$RELEASE.$DISTTAG" \ + architecture="$ARCH" \ + summary="A key-value store for shared configuration and service discovery." \ maintainer="Giuseppe Scrivano " RUN dnf -y --setopt=tsflags=nodocs install etcd hostname && \ diff --git a/config.json.template b/config.json.template index 7fd0657..73cfa73 100644 --- a/config.json.template +++ b/config.json.template @@ -1,5 +1,5 @@ { - "ociVersion": "0.3.0", + "ociVersion": "1.0.0", "platform": { "os": "linux", "arch": "amd64" @@ -56,7 +56,41 @@ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm" ], - "cwd": "/" + "cwd": "/", + "capabilities": { + "bounding": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "permitted": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "inheritable": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "effective": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "ambient": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ] + }, + "rlimits": [ + { + "type": "RLIMIT_NOFILE", + "hard": 1024, + "soft": 1024 + } + ] }, "root": { "path": "rootfs", @@ -155,21 +189,19 @@ "rw", "mode=755" ] - } + }, + { + "destination": "/etc/resolv.conf", + "type": "bind", + "source": "/etc/resolv.conf", + "options": [ + "ro", + "rbind", + "rprivate" + ] + } ], "linux": { - "capabilities": [ - "CAP_AUDIT_WRITE", - "CAP_KILL", - "CAP_NET_BIND_SERVICE" - ], - "rlimits": [ - { - "type": "RLIMIT_NOFILE", - "hard": 1024, - "soft": 1024 - } - ], "resources": { "devices": [ {