File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,6 +163,32 @@ RUN set -eux \
163163 cp -r /usr/bin/mongo* /tmp/mongo/; \
164164 fi
165165
166+ # ##
167+ # ## Strip debugging information to smallen filesize
168+ # ##
169+ RUN set -eux \
170+ && STRIP_USR_BINS="blackfire mongo mysql redis sqlite" \
171+ && STRIP_DIRS="/usr/lib/postgresql/ /usr/share/postgresql-common/ /tmp" \
172+ \
173+ && for bin in ${STRIP_USR_BINS}; do \
174+ ( \
175+ find /usr/bin/ -name "${bin}" * -type f -print0 \
176+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
177+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
178+ ) \
179+ done \
180+ \
181+ && for dir in ${STRIP_DIRS}; do \
182+ ( \
183+ find ${dir} -type f -print0 \
184+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
185+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
186+ ) \
187+ done \
188+ \
189+ && strip --strip-all -p /usr/local/bin/mhsendmail 2>/dev/null || true \
190+ && strip --strip-all -p /usr/local/bin/mysqldump-secure 2>/dev/null || true
191+
166192
167193
168194# #######################################################################################################################
@@ -180,7 +206,7 @@ FROM devilbox/php-fpm:{{ php_version }}-prod as devilbox-slim-base
180206ARG ARCH
181207
182208# ##
183- # ## Copy shared libraries
209+ # ## Copy shared libraries (required by MongoDB, MySQL, PostgreSQL and Redis)
184210# ##
185211COPY --from=devilbox-slim-base-builder /tmp/lib-gnu/ /lib/${ARCH}-linux-gnu/
186212COPY --from=devilbox-slim-base-builder /tmp/usr-lib-gnu/ /usr/lib/${ARCH}-linux-gnu/
Original file line number Diff line number Diff line change @@ -209,6 +209,32 @@ RUN set -eux \
209209 cp -r /usr/bin/mongo* /tmp/mongo/; \
210210 fi
211211
212+ # ##
213+ # ## Strip debugging information to smallen filesize
214+ # ##
215+ RUN set -eux \
216+ && STRIP_USR_BINS="blackfire mongo mysql redis sqlite" \
217+ && STRIP_DIRS="/usr/lib/postgresql/ /usr/share/postgresql-common/ /tmp" \
218+ \
219+ && for bin in ${STRIP_USR_BINS}; do \
220+ ( \
221+ find /usr/bin/ -name "${bin}" * -type f -print0 \
222+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
223+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
224+ ) \
225+ done \
226+ \
227+ && for dir in ${STRIP_DIRS}; do \
228+ ( \
229+ find ${dir} -type f -print0 \
230+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
231+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
232+ ) \
233+ done \
234+ \
235+ && strip --strip-all -p /usr/local/bin/mhsendmail 2>/dev/null || true \
236+ && strip --strip-all -p /usr/local/bin/mysqldump-secure 2>/dev/null || true
237+
212238
213239
214240# #######################################################################################################################
@@ -226,7 +252,7 @@ FROM devilbox/php-fpm:5.2-prod as devilbox-slim-base
226252ARG ARCH
227253
228254# ##
229- # ## Copy shared libraries
255+ # ## Copy shared libraries (required by MongoDB, MySQL, PostgreSQL and Redis)
230256# ##
231257COPY --from=devilbox-slim-base-builder /tmp/lib-gnu/ /lib/${ARCH}-linux-gnu/
232258COPY --from=devilbox-slim-base-builder /tmp/usr-lib-gnu/ /usr/lib/${ARCH}-linux-gnu/
Original file line number Diff line number Diff line change @@ -209,6 +209,32 @@ RUN set -eux \
209209 cp -r /usr/bin/mongo* /tmp/mongo/; \
210210 fi
211211
212+ # ##
213+ # ## Strip debugging information to smallen filesize
214+ # ##
215+ RUN set -eux \
216+ && STRIP_USR_BINS="blackfire mongo mysql redis sqlite" \
217+ && STRIP_DIRS="/usr/lib/postgresql/ /usr/share/postgresql-common/ /tmp" \
218+ \
219+ && for bin in ${STRIP_USR_BINS}; do \
220+ ( \
221+ find /usr/bin/ -name "${bin}" * -type f -print0 \
222+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
223+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
224+ ) \
225+ done \
226+ \
227+ && for dir in ${STRIP_DIRS}; do \
228+ ( \
229+ find ${dir} -type f -print0 \
230+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
231+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
232+ ) \
233+ done \
234+ \
235+ && strip --strip-all -p /usr/local/bin/mhsendmail 2>/dev/null || true \
236+ && strip --strip-all -p /usr/local/bin/mysqldump-secure 2>/dev/null || true
237+
212238
213239
214240# #######################################################################################################################
@@ -226,7 +252,7 @@ FROM devilbox/php-fpm:5.3-prod as devilbox-slim-base
226252ARG ARCH
227253
228254# ##
229- # ## Copy shared libraries
255+ # ## Copy shared libraries (required by MongoDB, MySQL, PostgreSQL and Redis)
230256# ##
231257COPY --from=devilbox-slim-base-builder /tmp/lib-gnu/ /lib/${ARCH}-linux-gnu/
232258COPY --from=devilbox-slim-base-builder /tmp/usr-lib-gnu/ /usr/lib/${ARCH}-linux-gnu/
Original file line number Diff line number Diff line change @@ -209,6 +209,32 @@ RUN set -eux \
209209 cp -r /usr/bin/mongo* /tmp/mongo/; \
210210 fi
211211
212+ # ##
213+ # ## Strip debugging information to smallen filesize
214+ # ##
215+ RUN set -eux \
216+ && STRIP_USR_BINS="blackfire mongo mysql redis sqlite" \
217+ && STRIP_DIRS="/usr/lib/postgresql/ /usr/share/postgresql-common/ /tmp" \
218+ \
219+ && for bin in ${STRIP_USR_BINS}; do \
220+ ( \
221+ find /usr/bin/ -name "${bin}" * -type f -print0 \
222+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
223+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
224+ ) \
225+ done \
226+ \
227+ && for dir in ${STRIP_DIRS}; do \
228+ ( \
229+ find ${dir} -type f -print0 \
230+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
231+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
232+ ) \
233+ done \
234+ \
235+ && strip --strip-all -p /usr/local/bin/mhsendmail 2>/dev/null || true \
236+ && strip --strip-all -p /usr/local/bin/mysqldump-secure 2>/dev/null || true
237+
212238
213239
214240# #######################################################################################################################
@@ -226,7 +252,7 @@ FROM devilbox/php-fpm:5.4-prod as devilbox-slim-base
226252ARG ARCH
227253
228254# ##
229- # ## Copy shared libraries
255+ # ## Copy shared libraries (required by MongoDB, MySQL, PostgreSQL and Redis)
230256# ##
231257COPY --from=devilbox-slim-base-builder /tmp/lib-gnu/ /lib/${ARCH}-linux-gnu/
232258COPY --from=devilbox-slim-base-builder /tmp/usr-lib-gnu/ /usr/lib/${ARCH}-linux-gnu/
Original file line number Diff line number Diff line change @@ -209,6 +209,32 @@ RUN set -eux \
209209 cp -r /usr/bin/mongo* /tmp/mongo/; \
210210 fi
211211
212+ # ##
213+ # ## Strip debugging information to smallen filesize
214+ # ##
215+ RUN set -eux \
216+ && STRIP_USR_BINS="blackfire mongo mysql redis sqlite" \
217+ && STRIP_DIRS="/usr/lib/postgresql/ /usr/share/postgresql-common/ /tmp" \
218+ \
219+ && for bin in ${STRIP_USR_BINS}; do \
220+ ( \
221+ find /usr/bin/ -name "${bin}" * -type f -print0 \
222+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
223+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
224+ ) \
225+ done \
226+ \
227+ && for dir in ${STRIP_DIRS}; do \
228+ ( \
229+ find ${dir} -type f -print0 \
230+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
231+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
232+ ) \
233+ done \
234+ \
235+ && strip --strip-all -p /usr/local/bin/mhsendmail 2>/dev/null || true \
236+ && strip --strip-all -p /usr/local/bin/mysqldump-secure 2>/dev/null || true
237+
212238
213239
214240# #######################################################################################################################
@@ -226,7 +252,7 @@ FROM devilbox/php-fpm:5.5-prod as devilbox-slim-base
226252ARG ARCH
227253
228254# ##
229- # ## Copy shared libraries
255+ # ## Copy shared libraries (required by MongoDB, MySQL, PostgreSQL and Redis)
230256# ##
231257COPY --from=devilbox-slim-base-builder /tmp/lib-gnu/ /lib/${ARCH}-linux-gnu/
232258COPY --from=devilbox-slim-base-builder /tmp/usr-lib-gnu/ /usr/lib/${ARCH}-linux-gnu/
Original file line number Diff line number Diff line change @@ -213,6 +213,32 @@ RUN set -eux \
213213 cp -r /usr/bin/mongo* /tmp/mongo/; \
214214 fi
215215
216+ # ##
217+ # ## Strip debugging information to smallen filesize
218+ # ##
219+ RUN set -eux \
220+ && STRIP_USR_BINS="blackfire mongo mysql redis sqlite" \
221+ && STRIP_DIRS="/usr/lib/postgresql/ /usr/share/postgresql-common/ /tmp" \
222+ \
223+ && for bin in ${STRIP_USR_BINS}; do \
224+ ( \
225+ find /usr/bin/ -name "${bin}" * -type f -print0 \
226+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
227+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
228+ ) \
229+ done \
230+ \
231+ && for dir in ${STRIP_DIRS}; do \
232+ ( \
233+ find ${dir} -type f -print0 \
234+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
235+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
236+ ) \
237+ done \
238+ \
239+ && strip --strip-all -p /usr/local/bin/mhsendmail 2>/dev/null || true \
240+ && strip --strip-all -p /usr/local/bin/mysqldump-secure 2>/dev/null || true
241+
216242
217243
218244# #######################################################################################################################
@@ -230,7 +256,7 @@ FROM devilbox/php-fpm:5.6-prod as devilbox-slim-base
230256ARG ARCH
231257
232258# ##
233- # ## Copy shared libraries
259+ # ## Copy shared libraries (required by MongoDB, MySQL, PostgreSQL and Redis)
234260# ##
235261COPY --from=devilbox-slim-base-builder /tmp/lib-gnu/ /lib/${ARCH}-linux-gnu/
236262COPY --from=devilbox-slim-base-builder /tmp/usr-lib-gnu/ /usr/lib/${ARCH}-linux-gnu/
Original file line number Diff line number Diff line change @@ -213,6 +213,32 @@ RUN set -eux \
213213 cp -r /usr/bin/mongo* /tmp/mongo/; \
214214 fi
215215
216+ # ##
217+ # ## Strip debugging information to smallen filesize
218+ # ##
219+ RUN set -eux \
220+ && STRIP_USR_BINS="blackfire mongo mysql redis sqlite" \
221+ && STRIP_DIRS="/usr/lib/postgresql/ /usr/share/postgresql-common/ /tmp" \
222+ \
223+ && for bin in ${STRIP_USR_BINS}; do \
224+ ( \
225+ find /usr/bin/ -name "${bin}" * -type f -print0 \
226+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
227+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
228+ ) \
229+ done \
230+ \
231+ && for dir in ${STRIP_DIRS}; do \
232+ ( \
233+ find ${dir} -type f -print0 \
234+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
235+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
236+ ) \
237+ done \
238+ \
239+ && strip --strip-all -p /usr/local/bin/mhsendmail 2>/dev/null || true \
240+ && strip --strip-all -p /usr/local/bin/mysqldump-secure 2>/dev/null || true
241+
216242
217243
218244# #######################################################################################################################
@@ -230,7 +256,7 @@ FROM devilbox/php-fpm:7.0-prod as devilbox-slim-base
230256ARG ARCH
231257
232258# ##
233- # ## Copy shared libraries
259+ # ## Copy shared libraries (required by MongoDB, MySQL, PostgreSQL and Redis)
234260# ##
235261COPY --from=devilbox-slim-base-builder /tmp/lib-gnu/ /lib/${ARCH}-linux-gnu/
236262COPY --from=devilbox-slim-base-builder /tmp/usr-lib-gnu/ /usr/lib/${ARCH}-linux-gnu/
Original file line number Diff line number Diff line change @@ -207,6 +207,32 @@ RUN set -eux \
207207 cp -r /usr/bin/mongo* /tmp/mongo/; \
208208 fi
209209
210+ # ##
211+ # ## Strip debugging information to smallen filesize
212+ # ##
213+ RUN set -eux \
214+ && STRIP_USR_BINS="blackfire mongo mysql redis sqlite" \
215+ && STRIP_DIRS="/usr/lib/postgresql/ /usr/share/postgresql-common/ /tmp" \
216+ \
217+ && for bin in ${STRIP_USR_BINS}; do \
218+ ( \
219+ find /usr/bin/ -name "${bin}" * -type f -print0 \
220+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
221+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
222+ ) \
223+ done \
224+ \
225+ && for dir in ${STRIP_DIRS}; do \
226+ ( \
227+ find ${dir} -type f -print0 \
228+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
229+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
230+ ) \
231+ done \
232+ \
233+ && strip --strip-all -p /usr/local/bin/mhsendmail 2>/dev/null || true \
234+ && strip --strip-all -p /usr/local/bin/mysqldump-secure 2>/dev/null || true
235+
210236
211237
212238# #######################################################################################################################
@@ -224,7 +250,7 @@ FROM devilbox/php-fpm:7.1-prod as devilbox-slim-base
224250ARG ARCH
225251
226252# ##
227- # ## Copy shared libraries
253+ # ## Copy shared libraries (required by MongoDB, MySQL, PostgreSQL and Redis)
228254# ##
229255COPY --from=devilbox-slim-base-builder /tmp/lib-gnu/ /lib/${ARCH}-linux-gnu/
230256COPY --from=devilbox-slim-base-builder /tmp/usr-lib-gnu/ /usr/lib/${ARCH}-linux-gnu/
Original file line number Diff line number Diff line change @@ -207,6 +207,32 @@ RUN set -eux \
207207 cp -r /usr/bin/mongo* /tmp/mongo/; \
208208 fi
209209
210+ # ##
211+ # ## Strip debugging information to smallen filesize
212+ # ##
213+ RUN set -eux \
214+ && STRIP_USR_BINS="blackfire mongo mysql redis sqlite" \
215+ && STRIP_DIRS="/usr/lib/postgresql/ /usr/share/postgresql-common/ /tmp" \
216+ \
217+ && for bin in ${STRIP_USR_BINS}; do \
218+ ( \
219+ find /usr/bin/ -name "${bin}" * -type f -print0 \
220+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
221+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
222+ ) \
223+ done \
224+ \
225+ && for dir in ${STRIP_DIRS}; do \
226+ ( \
227+ find ${dir} -type f -print0 \
228+ | xargs -n1 -0 -P$(getconf _NPROCESSORS_ONLN) sh -c \
229+ 'if [ -f "${1}" ]; then echo "Strip: ${1}"; strip --strip-all -p "${1}" 2>/dev/null || true; fi' -- \
230+ ) \
231+ done \
232+ \
233+ && strip --strip-all -p /usr/local/bin/mhsendmail 2>/dev/null || true \
234+ && strip --strip-all -p /usr/local/bin/mysqldump-secure 2>/dev/null || true
235+
210236
211237
212238# #######################################################################################################################
@@ -224,7 +250,7 @@ FROM devilbox/php-fpm:7.2-prod as devilbox-slim-base
224250ARG ARCH
225251
226252# ##
227- # ## Copy shared libraries
253+ # ## Copy shared libraries (required by MongoDB, MySQL, PostgreSQL and Redis)
228254# ##
229255COPY --from=devilbox-slim-base-builder /tmp/lib-gnu/ /lib/${ARCH}-linux-gnu/
230256COPY --from=devilbox-slim-base-builder /tmp/usr-lib-gnu/ /usr/lib/${ARCH}-linux-gnu/
You can’t perform that action at this time.
0 commit comments