Skip to content

Commit ec0d6a5

Browse files
committed
Use chown from Docker directly
1 parent 7884752 commit ec0d6a5

File tree

5 files changed

+10
-15
lines changed

5 files changed

+10
-15
lines changed

Dockerfile-alpine.template

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ RUN set -ex; \
122122
apk del --no-network .fetch-deps
123123

124124
# Copy configuration
125-
COPY config.inc.php /etc/phpmyadmin/config.inc.php
126-
COPY helpers.php /etc/phpmyadmin/helpers.php
127-
RUN chown www-data:www-data -R /etc/phpmyadmin/
125+
COPY --chown=www-data:www-data config.inc.php /etc/phpmyadmin/config.inc.php
126+
COPY --chown=www-data:www-data helpers.php /etc/phpmyadmin/helpers.php
128127

129128
# Copy main script
130129
COPY docker-entrypoint.sh /docker-entrypoint.sh

Dockerfile-debian.template

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ RUN set -ex; \
142142
rm -rf /var/lib/apt/lists/*
143143

144144
# Copy configuration
145-
COPY config.inc.php /etc/phpmyadmin/config.inc.php
146-
COPY helpers.php /etc/phpmyadmin/helpers.php
147-
RUN chown www-data:www-data -R /etc/phpmyadmin/
145+
COPY --chown=www-data:www-data config.inc.php /etc/phpmyadmin/config.inc.php
146+
COPY --chown=www-data:www-data helpers.php /etc/phpmyadmin/helpers.php
148147

149148
# Copy main script
150149
COPY docker-entrypoint.sh /docker-entrypoint.sh

apache/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,8 @@ RUN set -ex; \
143143
rm -rf /var/lib/apt/lists/*
144144

145145
# Copy configuration
146-
COPY config.inc.php /etc/phpmyadmin/config.inc.php
147-
COPY helpers.php /etc/phpmyadmin/helpers.php
148-
RUN chown www-data:www-data -R /etc/phpmyadmin/
146+
COPY --chown=www-data:www-data config.inc.php /etc/phpmyadmin/config.inc.php
147+
COPY --chown=www-data:www-data helpers.php /etc/phpmyadmin/helpers.php
149148

150149
# Copy main script
151150
COPY docker-entrypoint.sh /docker-entrypoint.sh

fpm-alpine/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ RUN set -ex; \
123123
apk del --no-network .fetch-deps
124124

125125
# Copy configuration
126-
COPY config.inc.php /etc/phpmyadmin/config.inc.php
127-
COPY helpers.php /etc/phpmyadmin/helpers.php
128-
RUN chown www-data:www-data -R /etc/phpmyadmin/
126+
COPY --chown=www-data:www-data config.inc.php /etc/phpmyadmin/config.inc.php
127+
COPY --chown=www-data:www-data helpers.php /etc/phpmyadmin/helpers.php
129128

130129
# Copy main script
131130
COPY docker-entrypoint.sh /docker-entrypoint.sh

fpm/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ RUN set -ex; \
140140
rm -rf /var/lib/apt/lists/*
141141

142142
# Copy configuration
143-
COPY config.inc.php /etc/phpmyadmin/config.inc.php
144-
COPY helpers.php /etc/phpmyadmin/helpers.php
145-
RUN chown www-data:www-data -R /etc/phpmyadmin/
143+
COPY --chown=www-data:www-data config.inc.php /etc/phpmyadmin/config.inc.php
144+
COPY --chown=www-data:www-data helpers.php /etc/phpmyadmin/helpers.php
146145

147146
# Copy main script
148147
COPY docker-entrypoint.sh /docker-entrypoint.sh

0 commit comments

Comments
 (0)