From 47ab206f685cf52acb848239dfed0b02e3790e8b Mon Sep 17 00:00:00 2001 From: t3chn0m4g3 Date: Tue, 4 Sep 2018 15:28:46 +0000 Subject: [PATCH] clean up dockerfile, prepare for s --- docker/glastopf/Dockerfile | 29 ++------ docker/glastopf/testing/Dockerfile.backup | 90 ----------------------- docker/glastopf/testing/Dockerfile.new | 73 ------------------ 3 files changed, 5 insertions(+), 187 deletions(-) delete mode 100644 docker/glastopf/testing/Dockerfile.backup delete mode 100644 docker/glastopf/testing/Dockerfile.new diff --git a/docker/glastopf/Dockerfile b/docker/glastopf/Dockerfile index 1137ce04..6858beda 100644 --- a/docker/glastopf/Dockerfile +++ b/docker/glastopf/Dockerfile @@ -13,35 +13,16 @@ RUN apk -U --no-cache add \ libffi \ libffi-dev \ libcap \ + libxslt-dev \ make \ - py-asn1 \ - py-cffi \ - py-chardet \ - py-cparser \ - py-cryptography \ - py-dateutil \ - py-enum34 \ - py-idna \ - py-ipaddress \ - py-jinja2 \ - py-lxml \ + php7 \ + php7-dev \ py-mysqldb \ py-openssl \ py-pip \ - py-requests \ py-setuptools \ python \ python-dev && \ - apk -U add --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \ - py-beautifulsoup4 \ - php7 \ - php7-dev \ - py-cssselect \ - py-gevent \ - py-greenlet \ - py-mongo \ - py-sqlalchemy \ - py-webob && \ pip install --no-cache-dir --upgrade pip && \ # Install php sandbox from git @@ -60,6 +41,7 @@ RUN apk -U --no-cache add \ # Install glastopf from git git clone --depth=1 https://github.com/mushorg/glastopf.git /opt/glastopf && \ cd /opt/glastopf && \ + cp /root/dist/requirements.txt . && \ pip install --no-cache-dir . && \ cd / && \ rm -rf /opt/glastopf /tmp/* /var/tmp/* && \ @@ -79,8 +61,7 @@ RUN apk -U --no-cache add \ libffi-dev \ php7-dev \ python-dev \ - py-pip \ - re2c && \ + py-pip && \ rm -rf /root/* && \ rm -rf /var/cache/apk/* diff --git a/docker/glastopf/testing/Dockerfile.backup b/docker/glastopf/testing/Dockerfile.backup deleted file mode 100644 index 1137ce04..00000000 --- a/docker/glastopf/testing/Dockerfile.backup +++ /dev/null @@ -1,90 +0,0 @@ -FROM alpine - -# Include dist -ADD dist/ /root/dist/ - -# Install packages -RUN apk -U --no-cache add \ - autoconf \ - bind-tools \ - build-base \ - cython \ - git \ - libffi \ - libffi-dev \ - libcap \ - make \ - py-asn1 \ - py-cffi \ - py-chardet \ - py-cparser \ - py-cryptography \ - py-dateutil \ - py-enum34 \ - py-idna \ - py-ipaddress \ - py-jinja2 \ - py-lxml \ - py-mysqldb \ - py-openssl \ - py-pip \ - py-requests \ - py-setuptools \ - python \ - python-dev && \ - apk -U add --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \ - py-beautifulsoup4 \ - php7 \ - php7-dev \ - py-cssselect \ - py-gevent \ - py-greenlet \ - py-mongo \ - py-sqlalchemy \ - py-webob && \ - pip install --no-cache-dir --upgrade pip && \ - -# Install php sandbox from git - git clone --depth=1 https://github.com/mushorg/BFR /opt/BFR && \ - cd /opt/BFR && \ - phpize7 && \ - ./configure \ - --with-php-config=/usr/bin/php-config7 \ - --enable-bfr && \ - make && \ - make install && \ - cd / && \ - rm -rf /opt/BFR /tmp/* /var/tmp/* && \ - echo "zend_extension = "$(find /usr -name bfr.so) >> /etc/php7/php.ini && \ - -# Install glastopf from git - git clone --depth=1 https://github.com/mushorg/glastopf.git /opt/glastopf && \ - cd /opt/glastopf && \ - pip install --no-cache-dir . && \ - cd / && \ - rm -rf /opt/glastopf /tmp/* /var/tmp/* && \ - setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \ - -# Setup user, groups and configs - addgroup -g 2000 glastopf && \ - adduser -S -H -u 2000 -D -g 2000 glastopf && \ - mkdir -p /etc/glastopf && \ - mv /root/dist/glastopf.cfg /etc/glastopf/ && \ - -# Clean up - apk del --purge autoconf \ - build-base \ - file \ - git \ - libffi-dev \ - php7-dev \ - python-dev \ - py-pip \ - re2c && \ - rm -rf /root/* && \ - rm -rf /var/cache/apk/* - -# Set workdir and start glastopf -#USER glastopf:glastopf -WORKDIR /tmp/glastopf/ -CMD cp /etc/glastopf/glastopf.cfg /tmp/glastopf && exec glastopf-runner diff --git a/docker/glastopf/testing/Dockerfile.new b/docker/glastopf/testing/Dockerfile.new deleted file mode 100644 index b9f4632b..00000000 --- a/docker/glastopf/testing/Dockerfile.new +++ /dev/null @@ -1,73 +0,0 @@ -FROM alpine - -# Include dist -ADD dist/ /root/dist/ - -# Install packages -RUN apk -U --no-cache add \ - autoconf \ - bind-tools \ - build-base \ - cython \ - git \ - libcap \ - libffi \ - libffi-dev \ - libxslt-dev \ - make \ - py-mysqldb \ - py-openssl \ - py-pip \ - py-setuptools \ - python \ - python-dev \ - php7 \ - php7-dev \ - re2c && \ - pip install --no-cache-dir --upgrade pip && \ - -# Install php sandbox from git - git clone --depth=1 https://github.com/mushorg/BFR /opt/BFR && \ - cd /opt/BFR && \ - phpize7 && \ - ./configure \ - --with-php-config=/usr/bin/php-config7 \ - --enable-bfr && \ - make && \ - make install && \ - cd / && \ - rm -rf /opt/BFR /tmp/* /var/tmp/* && \ - echo "zend_extension = "$(find /usr -name bfr.so) >> /etc/php7/php.ini && \ - -# Install glastopf from git - git clone --depth=1 https://github.com/mushorg/glastopf.git /opt/glastopf && \ - cd /opt/glastopf && \ - cp /root/dist/requirements.txt . && \ - pip install --no-cache-dir . && \ - cd / && \ - rm -rf /opt/glastopf /tmp/* /var/tmp/* && \ - setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \ - -# Setup user, groups and configs - addgroup -g 2000 glastopf && \ - adduser -S -H -u 2000 -D -g 2000 glastopf && \ - mkdir -p /etc/glastopf && \ - mv /root/dist/glastopf.cfg /etc/glastopf/ && \ - -# Clean up - apk del --purge autoconf \ - build-base \ - file \ - git \ - libffi-dev \ - libxslt-dev \ - php7-dev \ - python-dev \ - py-pip && \ - rm -rf /root/* && \ - rm -rf /var/cache/apk/* - -# Set workdir and start glastopf -USER glastopf:glastopf -WORKDIR /tmp/glastopf/ -CMD cp /etc/glastopf/glastopf.cfg /tmp/glastopf && exec glastopf-runner