Merge pull request #2659 from coreos-inc/remove-unneeded-files

Remove unnecessary files in final Quay image
This commit is contained in:
josephschorr 2017-05-26 20:15:30 -04:00 committed by GitHub
commit cef4d3bf4b

View file

@ -14,7 +14,7 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# Install system packages # Install system packages
RUN apt-get update && apt-get upgrade -y # 27APR2017 RUN apt-get update && apt-get upgrade -y # 26MAY2017
RUN apt-get install -y \ RUN apt-get install -y \
dnsmasq \ dnsmasq \
g++ \ g++ \
@ -154,6 +154,7 @@ RUN pyclean .
RUN rm -rf /root/.npm RUN rm -rf /root/.npm
RUN rm -rf /.npm RUN rm -rf /.npm
RUN rm -rf /usr/local/lib/node_modules RUN rm -rf /usr/local/lib/node_modules
RUN rm -rf /usr/share/yarn/node_modules
RUN rm -rf /root/node_modules RUN rm -rf /root/node_modules
RUN rm -rf /node_modules RUN rm -rf /node_modules
RUN rm -rf /grunt RUN rm -rf /grunt
@ -170,14 +171,17 @@ RUN if [ "$RUN_TESTS" = true ]; then \
RUN if [ "$RUN_TESTS" = true ]; then \ RUN if [ "$RUN_TESTS" = true ]; then \
TEST=true PYTHONPATH="." venv/bin/py.test --timeout=7200 --verbose \ TEST=true PYTHONPATH="." venv/bin/py.test --timeout=7200 --verbose \
--show-count -x --color=no ./; \ --show-count -x --color=no ./ && rm -rf /var/tmp/; \
fi fi
RUN if [ "$RUN_TESTS" = true ]; then \ RUN if [ "$RUN_TESTS" = true ]; then \
TEST=true PYTHONPATH="." venv/bin/py.test --timeout=7200 --verbose \ TEST=true PYTHONPATH="." venv/bin/py.test --timeout=7200 --verbose \
--show-count -x --color=no test/registry_tests.py ; \ --show-count -x --color=no test/registry_tests.py && rm -rf /var/tmp/;\
fi fi
RUN rm -rf /root/.cache
RUN PYTHONPATH=. venv/bin/alembic heads | grep -E '^[0-9a-f]+ \(head\)$' > ALEMBIC_HEAD RUN PYTHONPATH=. venv/bin/alembic heads | grep -E '^[0-9a-f]+ \(head\)$' > ALEMBIC_HEAD
VOLUME ["/conf/stack", "/var/log", "/datastorage", "/tmp", "/conf/etcd"] VOLUME ["/conf/stack", "/var/log", "/datastorage", "/tmp", "/conf/etcd"]