Skip to content

Commit a64cbba

Browse files
committed
Extract Honcho deps and reduce size
Use `apt-get autoremove` to remove all non-required deps. Extract Honcho (python dependencies). Add python and python-pkg-resources explicitly, so it does not get removed via `apt-get autoremove`. Shrink image size from ~550MB to ~410MB.
1 parent 60f1ad3 commit a64cbba

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ RUN \
1717
# In general...
1818
build-essential \
1919
curl \
20-
python-pip \
2120

2221
# For Nginx
2322
libpcre3-dev \
@@ -36,7 +35,12 @@ RUN \
3635
re2c \
3736

3837
# For PHP composer
39-
git && \
38+
git \
39+
40+
# For Honcho
41+
python \
42+
python-pip \
43+
python-pkg-resources && \
4044

4145
pip install honcho && \
4246

@@ -207,6 +211,8 @@ RUN \
207211
python-pip \
208212
re2c && \
209213

214+
apt-get autoremove -y && \
215+
210216
rm -rf /var/lib/apt/lists/* && \
211217
rm -rf /tmp/build
212218

0 commit comments

Comments
 (0)