docker-registry/Dockerfile.template: Adjust Python 2 dependency
authorW. Trevor King <wking@tremily.us>
Fri, 22 Aug 2014 10:47:51 +0000 (03:47 -0700)
committerW. Trevor King <wking@tremily.us>
Fri, 22 Aug 2014 10:47:51 +0000 (03:47 -0700)
Now that the ancestor gentoo-python image is removing Python 2, we
need to get it back for docker-registry.  We need to keep the
USE_PYTHON setting (with a tweaked value) because *TODO* hasn't
transitioned to the *-r1 Python eclasses yet:

  TODO

docker-registry/Dockerfile.template

index cbb378879187006e388b4c26c8d854758e8c5e7b..5478e9a14c13d7d0dff8f4eb09becc7e1df73933 100644 (file)
@@ -26,9 +26,11 @@ FROM ${NAMESPACE}/gentoo-syslog:${TAG}
 MAINTAINER ${MAINTAINER}
 #VOLUME ["${PORTAGE}:/usr/portage:ro", "${PORTAGE}/distfiles:/usr/portage/distfiles:rw"]
 RUN echo 'USE="${USE} sqlite"' >> /etc/portage/make.conf
-RUN echo 'PYTHON_TARGETS="python2_7"' >> /etc/portage/make.conf
-RUN echo 'PYTHON_SINGLE_TARGET="python2_7"' >> /etc/portage/make.conf
+RUN sed -i 's/\(PYTHON_TARGETS\)=.*/\1="python2_7"/' /etc/portage/make.conf
+RUN sed -i 's/\(PYTHON_SINGLE_TARGET\)=.*/\1="python2_7"/' /etc/portage/make.conf
 RUN echo 'USE_PYTHON="2.7"' >> /etc/portage/make.conf
+RUN emerge -v --newuse --deep --with-bdeps=y @system @world
+RUN eselect python set $(eselect python show --python2)
 ADD package.accept_keywords /etc/portage/package.accept_keywords
 RUN emerge -v dev-python/blinker dev-python/boto dev-python/backports-lzma dev-python/flask dev-python/gevent dev-python/pyyaml dev-python/redis-py dev-python/requests dev-python/rsa dev-python/simplejson dev-python/sqlalchemy dev-vcs/git www-servers/gunicorn
 RUN eselect news read new