Skip to content

Commit 275eace

Browse files
Optimize layers
Collpase installation layers and image went from 550Mb to 370mb
1 parent d185324 commit 275eace

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

Dockerfile-debian.template

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ FROM php:8.2-%%VARIANT%%
33
LABEL org.opencontainers.image.source=https://github.com/espocrm/espocrm
44
LABEL org.opencontainers.image.description="EspoCRM is an Open Source CRM. Try for Free."
55

6-
# Install php libs
76
RUN set -ex; \
87
\
98
aptMarkList="$(apt-mark showmanual)"; \
109
\
1110
apt-get update; \
11+
# Install php libs
1212
apt-get install -y --no-install-recommends \
1313
libpq-dev \
1414
libjpeg-dev \
@@ -72,10 +72,8 @@ RUN set -ex; \
7272
| sort -u \
7373
| xargs -rt apt-mark manual; \
7474
\
75-
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
76-
77-
# Install required libs
78-
RUN set -ex; \
75+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
76+
# Install required libs
7977
apt-get install -y --no-install-recommends \
8078
unzip \
8179
libldap-common \

apache/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ FROM php:8.2-apache
33
LABEL org.opencontainers.image.source=https://github.com/espocrm/espocrm
44
LABEL org.opencontainers.image.description="EspoCRM is an Open Source CRM. Try for Free."
55

6-
# Install php libs
76
RUN set -ex; \
87
\
98
aptMarkList="$(apt-mark showmanual)"; \
109
\
1110
apt-get update; \
11+
# Install php libs
1212
apt-get install -y --no-install-recommends \
1313
libpq-dev \
1414
libjpeg-dev \
@@ -72,10 +72,8 @@ RUN set -ex; \
7272
| sort -u \
7373
| xargs -rt apt-mark manual; \
7474
\
75-
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
76-
77-
# Install required libs
78-
RUN set -ex; \
75+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
76+
# Install required libs
7977
apt-get install -y --no-install-recommends \
8078
unzip \
8179
libldap-common \

fpm/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ FROM php:8.2-fpm
33
LABEL org.opencontainers.image.source=https://github.com/espocrm/espocrm
44
LABEL org.opencontainers.image.description="EspoCRM is an Open Source CRM. Try for Free."
55

6-
# Install php libs
76
RUN set -ex; \
87
\
98
aptMarkList="$(apt-mark showmanual)"; \
109
\
1110
apt-get update; \
11+
# Install php libs
1212
apt-get install -y --no-install-recommends \
1313
libpq-dev \
1414
libjpeg-dev \
@@ -72,10 +72,8 @@ RUN set -ex; \
7272
| sort -u \
7373
| xargs -rt apt-mark manual; \
7474
\
75-
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
76-
77-
# Install required libs
78-
RUN set -ex; \
75+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
76+
# Install required libs
7977
apt-get install -y --no-install-recommends \
8078
unzip \
8179
libldap-common \

0 commit comments

Comments
 (0)