glyph / deployme Goto Github PK
View Code? Open in Web Editor NEWExample project for deployment
Example project for deployment
Hello, i'm trying out this on a mac, using latest docker-machine. I can't understand why it fails to find the Twisted wheel file in the wheelhouse, although i can see it's present.
This is the result of runnning build.sh
:
$ ./build.sh
+ set -e
+ mkdir -p wheelhouse
+ docker build -t deployme-base -f base.docker .
Sending build context to Docker daemon 106.5 kB
Step 1 : FROM ubuntu:trusty
---> 8fa7f61732d6
Step 2 : RUN echo "deb http://ppa.launchpad.net/pypy/ppa/ubuntu trusty main" > /etc/apt/sources.list.d/pypy-ppa.list
---> Using cache
---> 2552b4a07d43
Step 3 : RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2862D0785AFACD8C65B23DB0251104D968854915
---> Using cache
---> db52d2b56ec4
Step 4 : RUN apt-get update
---> Using cache
---> fb001a8994eb
Step 5 : RUN apt-get install -qyy -o APT::Install-Recommends=false -o APT::Install-Suggests=false python-virtualenv pypy libffi6 openssl
---> Using cache
---> 63fc22e06e14
Step 6 : RUN virtualenv -p /usr/bin/pypy /appenv
---> Using cache
---> 2f59079664f7
Step 7 : RUN . /appenv/bin/activate; pip install pip==6.0.8
---> Using cache
---> 133edd7743ea
Successfully built 133edd7743ea
+ docker build -t deployme-builder -f build.docker .
Sending build context to Docker daemon 106.5 kB
Step 1 : FROM deployme-base
---> 133edd7743ea
Step 2 : RUN apt-get install -qy libffi-dev libssl-dev pypy-dev
---> Using cache
---> 224fbc2bb801
Step 3 : RUN . /appenv/bin/activate; pip install wheel
---> Using cache
---> cafb898f9af6
Step 4 : ENV WHEELHOUSE /wheelhouse
---> Using cache
---> 7fe3a36991c6
Step 5 : ENV PIP_WHEEL_DIR /wheelhouse
---> Using cache
---> 8b85f8c738ba
Step 6 : ENV PIP_FIND_LINKS /wheelhouse
---> Using cache
---> 61ececdc3bc1
Step 7 : VOLUME /wheelhouse
---> Using cache
---> 123393888391
Step 8 : VOLUME /application
---> Using cache
---> 0a110f2ca1e6
Step 9 : ENTRYPOINT . /appenv/bin/activate; cd /application; pip wheel .
---> Using cache
---> 73c46dd15d06
Successfully built 73c46dd15d06
++ pwd
++ pwd
+ docker run --rm -v /Users/ezequielgolub/whalerock/deployme_pristine:/application -v /Users/ezequielgolub/whalerock/deployme_pristine/wheelhouse:/wheelhouse deployme-builder
You are using pip version 6.0.8, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Processing /application
Collecting twisted>=15.0.0 (from DeployMe==0.1)
Downloading Twisted-16.1.1.tar.bz2 (2.9MB)
Collecting klein>=15.0.0 (from DeployMe==0.1)
Downloading klein-15.3.1-py2.py3-none-any.whl
Saved /wheelhouse/klein-15.3.1-py2.py3-none-any.whl
Collecting treq>=15.0.0 (from DeployMe==0.1)
Downloading treq-15.1.0-py2.py3-none-any.whl
Saved /wheelhouse/treq-15.1.0-py2.py3-none-any.whl
Collecting service-identity>=14.0.0 (from DeployMe==0.1)
Downloading service_identity-16.0.0-py2.py3-none-any.whl
Saved /wheelhouse/service_identity-16.0.0-py2.py3-none-any.whl
Collecting zope.interface>=3.6.0 (from twisted>=15.0.0->DeployMe==0.1)
Downloading zope.interface-4.1.3.tar.gz (141kB)
Collecting werkzeug (from klein>=15.0.0->DeployMe==0.1)
Downloading Werkzeug-0.11.9-py2.py3-none-any.whl (306kB)
Saved /wheelhouse/Werkzeug-0.11.9-py2.py3-none-any.whl
Collecting pyOpenSSL>=0.13 (from treq>=15.0.0->DeployMe==0.1)
Downloading pyOpenSSL-16.0.0-py2.py3-none-any.whl (45kB)
Saved /wheelhouse/pyOpenSSL-16.0.0-py2.py3-none-any.whl
Collecting requests>=2.1.0 (from treq>=15.0.0->DeployMe==0.1)
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
Saved /wheelhouse/requests-2.10.0-py2.py3-none-any.whl
Collecting attrs (from service-identity>=14.0.0->DeployMe==0.1)
Downloading attrs-15.2.0-py2.py3-none-any.whl
Saved /wheelhouse/attrs-15.2.0-py2.py3-none-any.whl
Collecting pyasn1 (from service-identity>=14.0.0->DeployMe==0.1)
Downloading pyasn1-0.1.9-py2.py3-none-any.whl
Saved /wheelhouse/pyasn1-0.1.9-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity>=14.0.0->DeployMe==0.1)
Downloading pyasn1_modules-0.0.8-py2.py3-none-any.whl
Saved /wheelhouse/pyasn1_modules-0.0.8-py2.py3-none-any.whl
Collecting setuptools (from zope.interface>=3.6.0->twisted>=15.0.0->DeployMe==0.1)
Downloading setuptools-21.0.0-py2.py3-none-any.whl (509kB)
Saved /wheelhouse/setuptools-21.0.0-py2.py3-none-any.whl
Collecting cryptography>=1.3 (from pyOpenSSL>=0.13->treq>=15.0.0->DeployMe==0.1)
Downloading cryptography-1.3.1.tar.gz (383kB)
Collecting six>=1.5.2 (from pyOpenSSL>=0.13->treq>=15.0.0->DeployMe==0.1)
Downloading six-1.10.0-py2.py3-none-any.whl
Saved /wheelhouse/six-1.10.0-py2.py3-none-any.whl
Collecting idna>=2.0 (from cryptography>=1.3->pyOpenSSL>=0.13->treq>=15.0.0->DeployMe==0.1)
Downloading idna-2.1-py2.py3-none-any.whl (54kB)
Saved /wheelhouse/idna-2.1-py2.py3-none-any.whl
Collecting enum34 (from cryptography>=1.3->pyOpenSSL>=0.13->treq>=15.0.0->DeployMe==0.1)
Downloading enum34-1.1.4-py2.py3-none-any.whl (61kB)
Saved /wheelhouse/enum34-1.1.4-py2.py3-none-any.whl
Collecting ipaddress (from cryptography>=1.3->pyOpenSSL>=0.13->treq>=15.0.0->DeployMe==0.1)
Downloading ipaddress-1.0.16-py27-none-any.whl
Saved /wheelhouse/ipaddress-1.0.16-py27-none-any.whl
Skipping klein, due to already being wheel.
Skipping treq, due to already being wheel.
Skipping service-identity, due to already being wheel.
Skipping werkzeug, due to already being wheel.
Skipping pyOpenSSL, due to already being wheel.
Skipping requests, due to already being wheel.
Skipping attrs, due to already being wheel.
Skipping pyasn1, due to already being wheel.
Skipping pyasn1-modules, due to already being wheel.
Skipping setuptools, due to already being wheel.
Skipping six, due to already being wheel.
Skipping idna, due to already being wheel.
Skipping enum34, due to already being wheel.
Skipping ipaddress, due to already being wheel.
Building wheels for collected packages: twisted, DeployMe, zope.interface, cryptography
Running setup.py bdist_wheel for twisted
Destination directory: /wheelhouse
Running setup.py bdist_wheel for DeployMe
Destination directory: /wheelhouse
Running setup.py bdist_wheel for zope.interface
Destination directory: /wheelhouse
Running setup.py bdist_wheel for cryptography
Destination directory: /wheelhouse
Successfully built twisted DeployMe zope.interface cryptography
+ docker build -t deployme-run -f run.docker .
Sending build context to Docker daemon 5.198 MB
Step 1 : FROM deployme-base
---> 133edd7743ea
Step 2 : ADD wheelhouse /wheelhouse
---> 75908963ed8f
Removing intermediate container 6ae018e88d0e
Step 3 : RUN . /appenv/bin/activate; pip install --no-index -f wheelhouse DeployMe
---> Running in ed25f33559be
Ignoring indexes: https://pypi.python.org/simple
Collecting DeployMe
Collecting klein>=15.0.0 (from DeployMe)
Collecting service-identity>=14.0.0 (from DeployMe)
Collecting treq>=15.0.0 (from DeployMe)
Collecting twisted>=15.0.0 (from DeployMe)
Could not find any downloads that satisfy the requirement twisted>=15.0.0 (from DeployMe)
No distributions at all found for twisted>=15.0.0 (from DeployMe)
The command '/bin/sh -c . /appenv/bin/activate; pip install --no-index -f wheelhouse DeployMe' returned a non-zero code: 1
And if i do a ls wheelhouse
i get:
$ ls wheelhouse/
DeployMe-0.1-py2-none-any.whl idna-2.1-py2.py3-none-any.whl requests-2.10.0-py2.py3-none-any.whl
Twisted-16.1.1-pp250-pypy_41-linux_x86_64.whl ipaddress-1.0.16-py27-none-any.whl service_identity-16.0.0-py2.py3-none-any.whl
Werkzeug-0.11.9-py2.py3-none-any.whl klein-15.3.1-py2.py3-none-any.whl setuptools-21.0.0-py2.py3-none-any.whl
attrs-15.2.0-py2.py3-none-any.whl pyOpenSSL-16.0.0-py2.py3-none-any.whl six-1.10.0-py2.py3-none-any.whl
cryptography-1.3.1-pp250-pypy_41-linux_x86_64.whl pyasn1-0.1.9-py2.py3-none-any.whl treq-15.1.0-py2.py3-none-any.whl
enum34-1.1.4-py2.py3-none-any.whl pyasn1_modules-0.0.8-py2.py3-none-any.whl zope.interface-4.1.3-py2-none-any.whl
So clearly the wheel file is getting created, but i cannot understand why it's not getting picked up by run container :sad:
Hi!
I had the impression that when writing dockerfiles you always want to merge apt-get update
and apt-get install
in the same line. Here's the rationale: https://docs.docker.com/articles/dockerfile_best-practices/
Do write instructions like:
RUN apt-get update && apt-get install -y package-bar package-foo package-baz
Writing the instruction this way not only makes it easier to read and maintain, but also, by including apt-get update, ensures that the cache will naturally be busted and the latest versions will be installed with no further coding or manual intervention required.
So following that advice your build.docker could be written like this:
RUN apt-get update && apt-get install -qyy \
-o APT::Install-Recommends=false -o APT::Install-Suggests=false \
libffi6 \
openssl \
python-virtualenv \
pypy
Thanks for the great blog article!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.