Skip to content

Commit 5493fe1

Browse files
committed
Dockerfiles optimize storage size
- clean apt cache - Build and clean dependencies/TuttleOFX inside same RUN: avoid useless storage stacking - Gain 1.5GB size (3GB to 1.5GB)
1 parent 0584067 commit 5493fe1

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tools/docker/python2.7/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ RUN apt-get update && apt-get install -y \
1414
python-numpy \
1515
python-clint \
1616
python-argcomplete \
17+
python-pip\
18+
python-nose \
19+
python-imaging \
1720
libfreetype6-dev \
1821
libbz2-dev \
1922
libltdl-dev \
@@ -23,12 +26,9 @@ RUN apt-get update && apt-get install -y \
2326
libtiff5-dev \
2427
libilmbase-dev \
2528
libopenexr-dev \
26-
libopenimageio-dev \
2729
libglew-dev \
2830
libgraphviz-dev \
2931
graphviz-dev \
30-
python-nose \
31-
python-imaging \
3232
libopenjpeg-dev \
3333
libturbojpeg \
3434
libxmu-dev \
@@ -45,7 +45,7 @@ RUN apt-get update && apt-get install -y \
4545
libxvidcore-dev \
4646
bison \
4747
flex \
48-
python-pip
48+
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
4949

5050
ENV PYTHON_VERSION=2.7 \
5151
TRAVIS_OS_NAME=linux \
@@ -61,7 +61,7 @@ RUN mkdir ${TUTTLEOFX_BUILD} ${TRAVIS_BUILD_DIR}
6161

6262
COPY . ${TUTTLEOFX_DEV}
6363
RUN cd ${TUTTLEOFX_DEV} && git submodule update --init --recursive
64-
RUN cd ${TUTTLEOFX_DEV} && ${TUTTLEOFX_DEV}/tools/travis/install_dependencies.sh
65-
RUN cd ${TUTTLEOFX_DEV} && ${TUTTLEOFX_DEV}/tools/travis/build.sh
6664

67-
RUN rm -rf ${TUTTLEOFX_BUILD} ${TRAVIS_BUILD_DIR}
65+
RUN cd ${TUTTLEOFX_DEV} && ${TUTTLEOFX_DEV}/tools/travis/install_dependencies.sh && \
66+
cd ${TUTTLEOFX_DEV} && ${TUTTLEOFX_DEV}/tools/travis/build.sh && \
67+
rm -rf ${TUTTLEOFX_BUILD} ${TRAVIS_BUILD_DIR}

tools/docker/python3.5/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN apt-get update && apt-get install -y \
1414
python3-numpy \
1515
python3-clint \
1616
python3-argcomplete \
17-
python3-nose \
1817
python3-pip \
18+
python3-nose \
1919
libfreetype6-dev \
2020
libbz2-dev \
2121
libltdl-dev \
@@ -25,7 +25,6 @@ RUN apt-get update && apt-get install -y \
2525
libtiff5-dev \
2626
libilmbase-dev \
2727
libopenexr-dev \
28-
libopenimageio-dev \
2928
libglew-dev \
3029
libgraphviz-dev \
3130
graphviz-dev \
@@ -44,7 +43,8 @@ RUN apt-get update && apt-get install -y \
4443
libx264-dev \
4544
libxvidcore-dev \
4645
bison \
47-
flex
46+
flex \
47+
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
4848

4949
ENV PYTHON_VERSION=3.5 \
5050
TRAVIS_OS_NAME=linux \
@@ -60,7 +60,7 @@ RUN mkdir ${TUTTLEOFX_BUILD} ${TRAVIS_BUILD_DIR}
6060

6161
COPY . ${TUTTLEOFX_DEV}
6262
RUN cd ${TUTTLEOFX_DEV} && git submodule update --init --recursive
63-
RUN cd ${TUTTLEOFX_DEV} && ${TUTTLEOFX_DEV}/tools/travis/install_dependencies.sh
64-
RUN cd ${TUTTLEOFX_DEV} && ${TUTTLEOFX_DEV}/tools/travis/build.sh
6563

66-
RUN rm -rf ${TUTTLEOFX_BUILD} ${TRAVIS_BUILD_DIR}
64+
RUN cd ${TUTTLEOFX_DEV} && ${TUTTLEOFX_DEV}/tools/travis/install_dependencies.sh && \
65+
cd ${TUTTLEOFX_DEV} && ${TUTTLEOFX_DEV}/tools/travis/build.sh && \
66+
rm -rf ${TUTTLEOFX_BUILD} ${TRAVIS_BUILD_DIR}

0 commit comments

Comments
 (0)