Skip to content

Commit c706c52

Browse files
J0WInijel
authored andcommitted
Enhance caching by moving trivial tasks to the end
1 parent 8269a39 commit c706c52

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

Dockerfile

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ RUN set -ex; \
2828
apk add --virtual .phpmyadmin-phpexts-rundeps $runDeps; \
2929
apk del .build-deps
3030

31-
# Copy configuration
32-
COPY etc /etc/
33-
COPY php.ini /usr/local/etc/php/conf.d/php-phpmyadmin.ini
34-
35-
# Copy main script
36-
COPY run.sh /run.sh
37-
RUN chmod u+rwx /run.sh
38-
3931
# Calculate download URL
4032
ENV VERSION 4.8.1
4133
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
@@ -66,12 +58,18 @@ RUN set -ex; \
6658
chown -R root:nobody /www; \
6759
find /www -type d -exec chmod 750 {} \; ; \
6860
find /www -type f -exec chmod 640 {} \; ; \
61+
# Add directory for sessions to allow session persistence
62+
mkdir /sessions; \
63+
mkdir -p /www/tmp; \
64+
chmod -R 777 /www/tmp; \
6965
apk del .fetch-deps
7066

71-
# Add directory for sessions to allow session persistence
72-
RUN mkdir /sessions \
73-
&& mkdir -p /www/tmp \
74-
&& chmod -R 777 /www/tmp
67+
# Copy configuration
68+
COPY etc /etc/
69+
COPY php.ini /usr/local/etc/php/conf.d/php-phpmyadmin.ini
70+
71+
# Copy main script
72+
COPY run.sh /run.sh
7573

7674
# We expose phpMyAdmin on port 80
7775
EXPOSE 80

0 commit comments

Comments
 (0)