Giuseppe Lavagetto has submitted this change and it was merged. Change subject: Modify Dockerfile, build to meet WMF requirements ......................................................................
Modify Dockerfile, build to meet WMF requirements Change-Id: I7c7e68a3fbf06cd7a63cc71b2f30c7030b38cc18 --- M Dockerfile M build.sh A calico-requirements.txt 3 files changed, 31 insertions(+), 12 deletions(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/Dockerfile b/Dockerfile index 80f9f04..8ce2182 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ # Copyright 2015 Metaswitch Networks +# Copyright 2016 Wikimedia Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,18 +13,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.3 +FROM docker-registry.wikimedia.org/wikimedia-jessie:latest +MAINTAINER Giuseppe Lavagetto <[email protected]> + ADD *.py /code/ ADD handlers /code/handlers - +ADD calico-requirements.txt /calico-requirements.txt ADD build.sh /build.sh RUN /build.sh - -# Symlinks needed to workaround Alpine/Pyinstaller incompatibilties -# https://github.com/gliderlabs/docker-alpine/issues/48 -RUN ln -s /lib/libc.musl-x86_64.so.1 ldd -RUN ln -s /lib /lib64 -RUN ln -s /lib/ld-musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 CMD ["/dist/controller"] diff --git a/build.sh b/build.sh index 088aeaf..95fdcc6 100755 --- a/build.sh +++ b/build.sh @@ -3,17 +3,22 @@ set -x # Install the system packages needed for building the PyInstaller based binary -apk -U add --virtual temp python-dev py-pip alpine-sdk python py-setuptools openssl-dev libffi-dev +apt-get update && apt-get -y install --no-install-recommends python-pip \ + python-setuptools libssl-dev libffi-dev \ + python-simplejson python-yaml gcc python-dev git # Install python dependencies pip install --upgrade pip -pip install -r https://raw.githubusercontent.com/projectcalico/libcalico/v0.18.0/build-requirements-frozen.txt +pip install -r /calico-requirements.txt pip install git+https://github.com/projectcalico/[email protected] -pip install simplejson # Produce a binary - outputs to /dist/controller pyinstaller /code/controller.py -ayF # Cleanup everything that was installed now that we have a self contained binary -apk del temp && rm -rf /var/cache/apk/* +apt-get clean +rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* rm -rf /usr/lib/python2.7 +rm -rf /usr/local/lib/python2.7 +apt-get -y remove --purge libssl-dev libffi-dev python-dev git gcc && apt-get -y autoremove +rm -rf /usr/share/man/?? /usr/share/man/??_* diff --git a/calico-requirements.txt b/calico-requirements.txt new file mode 100644 index 0000000..2c74f14 --- /dev/null +++ b/calico-requirements.txt @@ -0,0 +1,17 @@ +ConcurrentLogHandler==0.9.1 +dnspython==1.12.0 +docker-py==1.7.2 +docopt==0.6.2 +netaddr==0.7.18 +prettytable==0.7.2 +PyInstaller==3.1.1 +# Pin python-etcd to commit that includes SSLv3 fix. Do not regenerate this file until after next python-etcd release. +git+https://github.com/jplana/python-etcd.git@0d0145f5e835aa032c97a0a5e09c4c68b7a03f66 +prometheus_client==0.0.13 +PyYAML==3.11 +requests==2.9.1 +six==1.10.0 +subprocess32==3.2.7 +urllib3==1.18 +virtualenv==12.1.1 +websocket-client==0.35.0 -- To view, visit https://gerrit.wikimedia.org/r/322660 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c7e68a3fbf06cd7a63cc71b2f30c7030b38cc18 Gerrit-PatchSet: 1 Gerrit-Project: operations/calico-k8s-policy-controller Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto <[email protected]> Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
