Skip to content

Commit 27ad984

Browse files
committed
fix: sed aplying onto other side
1 parent 54102b6 commit 27ad984

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

Dockerfile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,10 @@ RUN set -eux; \
8484
\
8585
apk del .build-deps
8686

87-
RUN if [ -f /etc/ssl/openssl.cnf ]; then \
88-
if grep -q "SECLEVEL" /etc/ssl/openssl.cnf 2>/dev/null; then \
89-
sed -i 's/SECLEVEL=2/SECLEVEL=1/g' /etc/ssl/openssl.cnf || true; \
90-
else \
91-
printf "\n# added to allow legacy DH for legacy SMTP servers (temporary)\n[openssl_init]\nopenssl_conf = default_conf\n\n[default_conf]\nssl_conf = ssl_sect\n\n[ssl_sect]\nsystem_default = system_default_sect\n\n[system_default_sect]\nCipherString = DEFAULT@SECLEVEL=1\n" >> /etc/ssl/openssl.cnf; \
92-
fi; \
93-
else \
94-
# si por alguna razón no existe el fichero, creamos uno mínimo
95-
printf "[openssl_init]\nopenssl_conf = default_conf\n\n[default_conf]\nssl_conf = ssl_sect\n\n[ssl_sect]\nsystem_default = system_default_sect\n\n[system_default_sect]\nCipherString = DEFAULT@SECLEVEL=1\n" > /etc/ssl/openssl.cnf; \
96-
fi
97-
98-
RUN update-ca-certificates || true
87+
RUN sed -i '/\[openssl_init\]/a ssl_conf = ssl_sect' /etc/ssl/openssl.cnf
88+
89+
RUN printf "\n[ssl_sect]\nsystem_default = system_default_sect\n\n[system_default_sect]\nCipherString = DEFAULT@SECLEVEL=1\n" >> /etc/ssl/openssl.cnf
90+
9991
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
10092

10193
RUN ln -s $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini

0 commit comments

Comments
 (0)