I have this Dockerfile:
FROM hopsoft/graphite-statsd
MAINTAINER Jakub Holy
# python dependencies
RUN pip install --global-option="--without-libyaml" PyYAML
RUN pip install boto
RUN pip install cloudwatch-to-graphite==0.5.0
EXPOSE 80 2003 8125/udp
CMD /sbin/my_init
When I build it with docker build -t monitoring .
it seems to have installed boto but then, when installing cloudwatch-to-graphite, it behaves as if it was not there:
Step 0 : FROM hopsoft/graphite-statsd
---> 5f10f9bdc418
Step 1 : MAINTAINER Jakub Holy
---> Using cache
---> 50881b8cb83f
Step 2 : RUN pip install --global-option="--without-libyaml" PyYAML
---> Using cache
---> 47ab159111a1
Step 3 : RUN pip install boto
---> Using cache
---> b60c39c70e8a
Step 4 : RUN pip install cloudwatch-to-graphite==0.5.0
---> Running in 2497f672cfc9
Downloading/unpacking cloudwatch-to-graphite==0.5.0
Downloading cloudwatch_to_graphite-0.5.0-py2.py3-none-any.whl
Downloading/unpacking Jinja2 (from cloudwatch-to-graphite==0.5.0)
Running setup.py (path:/tmp/pip_build_root/Jinja2/setup.py) egg_info for package Jinja2
warning: no files found matching '*' under directory 'custom_fixers'
warning: no previously-included files matching '*' found under directory 'docs/_build'
warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
Requirement already satisfied (use --upgrade to upgrade): PyYAML in /usr/local/lib/python2.7/dist-packages (from cloudwatch-to-graphite==0.5.0)
Downloading/unpacking docopt (from cloudwatch-to-graphite==0.5.0)
Downloading docopt-0.6.2.tar.gz
Running setup.py (path:/tmp/pip_build_root/docopt/setup.py) egg_info for package docopt
Downloading/unpacking boto (from cloudwatch-to-graphite==0.5.0)
Downloading/unpacking markupsafe (from Jinja2->cloudwatch-to-graphite==0.5.0)
Downloading MarkupSafe-0.23.tar.gz
Running setup.py (path:/tmp/pip_build_root/markupsafe/setup.py) egg_info for package markupsafe
Installing collected packages: cloudwatch-to-graphite, Jinja2, docopt, boto, markupsafe
Running setup.py install for Jinja2
warning: no files found matching '*' under directory 'custom_fixers'
warning: no previously-included files matching '*' found under directory 'docs/_build'
warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
Running setup.py install for docopt
Running setup.py install for markupsafe
building 'markupsafe._speedups' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c markupsafe/_speedups.c -o build/temp.linux-x86_64-2.7/markupsafe/_speedups.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/markupsafe/_speedups.o -o build/lib.linux-x86_64-2.7/markupsafe/_speedups.so
Successfully installed cloudwatch-to-graphite Jinja2 docopt boto markupsafe
Cleaning up...
---> 6cdd7b0359da
Removing intermediate container 2497f672cfc9
Step 5 : EXPOSE 80 2003 8125/udp
---> Running in a2caab6577ba
---> a002f50793ff
Removing intermediate container a2caab6577ba
Step 6 : CMD /sbin/my_init
---> Running in eb5da5a71c56
---> 7c18498e3fd3
Removing intermediate container eb5da5a71c56
Successfully built 7c18498e3fd3
When I run the resulting container, there is no trace of either boto or cloudwatch-to-graphite - while e.g. PyYAML is there:
root@7318ed2b04d0:/usr/local/src/carbon# pip list
argparse (1.2.1)
chardet (2.0.1)
colorama (0.2.5)
Django (1.3)
django-tagging (0.3.1)
docopt (0.6.2)
flup (1.0.2)
html5lib (0.999)
Jinja2 (2.7.3)
MarkupSafe (0.23)
pip (1.5.4)
python-memcached (1.53)
PyYAML (3.11)
requests (2.2.1)
setuptools (3.3)
six (1.5.2)
Twisted (11.1.0)
txAMQP (0.6.2)
urllib3 (1.7.1)
whisper (0.9.12)
wsgiref (0.1.2)
zope.interface (4.1.2)
root@7318ed2b04d0:/usr/local/src/carbon#
And:
find / -iname '*boto*' | wc -l
0
What is going on here? Why does it not contain these packages?
If I install it manually in the container (pip install cloudwatch-to-graphite
), it is there - though, for some reason (leftover from the earlier installation of graphite?), the packages ends up in /opt/graphite/lib/python2.7/site-packages/
.
PS: There is a similar question: Pip install -e packages don't appear in Docker