X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fcaas-danm.git;a=blobdiff_plain;f=docker-build%2Fhyperdanm%2FDockerfile;fp=docker-build%2Fhyperdanm%2FDockerfile;h=45e8905f04896c570e2a9e965d7e372228d0e607;hp=0000000000000000000000000000000000000000;hb=b2946a88e4058633ad18df1abddf5be1d247070c;hpb=d45b4117f30f9ad842c24f0c7c9fd8524a7f358f diff --git a/docker-build/hyperdanm/Dockerfile b/docker-build/hyperdanm/Dockerfile new file mode 100644 index 0000000..45e8905 --- /dev/null +++ b/docker-build/hyperdanm/Dockerfile @@ -0,0 +1,39 @@ +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM alpine:3.9 +MAINTAINER Levente Kale + +ARG danm_binaries="netwatcher svcwatcher webhook" + +COPY danm_binaries/ /usr/local/bin/ + +WORKDIR / + +RUN apk add --no-cache curl libcap iputils + +RUN set -x \ +&& env \ +&& adduser -u 147 -D -H -s /sbin/nologin danm \ +&& for component in $danm_binaries; do \ + chown root:danm /usr/local/bin/${component}; \ + chmod 750 /usr/local/bin/${component}; \ + done \ +&& rm -rf /var/cache/apk/* \ +&& rm -rf /var/lib/apt/lists/* \ +&& rm -rf /tmp/* \ +&& setcap cap_sys_ptrace,cap_sys_admin,cap_net_admin=eip /usr/local/bin/netwatcher \ +&& setcap cap_net_raw=eip /usr/sbin/arping + +USER danm