3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 MAINTAINER Krisztian Lengyel <krisztian.lengyel@nokia.com>
21 COPY get-package build-pip /usr/bin/
22 COPY source-list.txt ${GOPATH}/
28 && pip install --upgrade pip \
29 && mkdir -p ${GOPATH} \
30 && chmod 755 /usr/bin/build-pip /usr/bin/get-package \
32 && adduser -u 143 -D -H -s /sbin/nologin caas_etcd \
33 && chmod +x /etcdctl3 \
34 && chmod 644 ${GOPATH}/source-list.txt \
36 && apk add --no-cache --virtual .build-deps go godep curl tar build-base py-setuptools python2-dev \
37 && apk add --no-cache python2 py2-ipaddress py2-dnspython \
39 && build-pip python-urllib3 python-etcd \
41 && mkdir -p ${GOPATH}/src/github.com/coreos/etcd \
42 && curl -fsSL -k https://github.com/coreos/etcd/archive/v${ETCD_VERSION}.tar.gz | tar zx --strip-components=1 -C ${GOPATH}/src/github.com/coreos/etcd \
43 && cd ${GOPATH}/src/github.com/coreos/etcd \
44 && GOOS=linux ./build \
45 && mv bin/etcd /usr/bin/ \
46 && mv bin/etcdctl /usr/bin/ \
47 && mv /etcdctl3 /usr/bin/ \
49 && apk del .build-deps \