Skip to content

Commit e06bf44

Browse files
authored
Improve Composer autoload command (#162)
1 parent de73321 commit e06bf44

7 files changed

+11
-29
lines changed

FrankenPHP.Alpine.Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,8 @@ RUN mkdir -p \
194194
storage/logs \
195195
bootstrap/cache && chmod -R a+rw storage
196196

197-
RUN composer install \
197+
RUN composer dump-autoload \
198198
--classmap-authoritative \
199-
--no-interaction \
200-
--no-ansi \
201199
--no-dev \
202200
&& composer clear-cache
203201

FrankenPHP.Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ RUN apt-get update; \
9898
&& apt-get -y autoremove \
9999
&& apt-get clean \
100100
&& docker-php-source delete \
101-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
102-
&& rm -rf /var/log/lastlog /var/log/faillog
101+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/log/lastlog /var/log/faillog
103102

104103
RUN arch="$(uname -m)" \
105104
&& case "$arch" in \
@@ -195,10 +194,8 @@ RUN mkdir -p \
195194
storage/logs \
196195
bootstrap/cache && chmod -R a+rw storage
197196

198-
RUN composer install \
197+
RUN composer dump-autoload \
199198
--classmap-authoritative \
200-
--no-interaction \
201-
--no-ansi \
202199
--no-dev \
203200
&& composer clear-cache
204201

RoadRunner.Alpine.Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,8 @@ RUN mkdir -p \
175175
storage/logs \
176176
bootstrap/cache && chmod -R a+rw storage
177177

178-
RUN composer install \
178+
RUN composer dump-autoload \
179179
--classmap-authoritative \
180-
--no-interaction \
181-
--no-ansi \
182180
--no-dev \
183181
&& composer clear-cache
184182

RoadRunner.Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ RUN apt-get update; \
7777
&& apt-get -y autoremove \
7878
&& apt-get clean \
7979
&& docker-php-source delete \
80-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
81-
&& rm -rf /var/log/lastlog /var/log/faillog
80+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/log/lastlog /var/log/faillog
8281

8382
RUN arch="$(uname -m)" \
8483
&& case "$arch" in \
@@ -174,10 +173,8 @@ RUN mkdir -p \
174173
storage/logs \
175174
bootstrap/cache && chmod -R a+rw storage
176175

177-
RUN composer install \
176+
RUN composer dump-autoload \
178177
--classmap-authoritative \
179-
--no-interaction \
180-
--no-ansi \
181178
--no-dev \
182179
&& composer clear-cache
183180

Swoole.Alpine.Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,8 @@ RUN mkdir -p \
175175
storage/logs \
176176
bootstrap/cache && chmod -R a+rw storage
177177

178-
RUN composer install \
178+
RUN composer dump-autoload \
179179
--classmap-authoritative \
180-
--no-interaction \
181-
--no-ansi \
182180
--no-dev \
183181
&& composer clear-cache
184182

Swoole.Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ RUN apt-get update; \
7878
&& apt-get -y autoremove \
7979
&& apt-get clean \
8080
&& docker-php-source delete \
81-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
82-
&& rm -rf /var/log/lastlog /var/log/faillog
81+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/log/lastlog /var/log/faillog
8382

8483
RUN arch="$(uname -m)" \
8584
&& case "$arch" in \
@@ -174,10 +173,8 @@ RUN mkdir -p \
174173
storage/logs \
175174
bootstrap/cache && chmod -R a+rw storage
176175

177-
RUN composer install \
176+
RUN composer dump-autoload \
178177
--classmap-authoritative \
179-
--no-interaction \
180-
--no-ansi \
181178
--no-dev \
182179
&& composer clear-cache
183180

static-build.Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ RUN apt-get update; \
9898
&& apt-get -y autoremove \
9999
&& apt-get clean \
100100
&& docker-php-source delete \
101-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
102-
&& rm /var/log/lastlog /var/log/faillog
101+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/log/lastlog /var/log/faillog
103102

104103
RUN arch="$(uname -m)" \
105104
&& case "$arch" in \
@@ -195,10 +194,8 @@ RUN mkdir -p \
195194
storage/logs \
196195
bootstrap/cache && chmod -R a+rw storage
197196

198-
RUN composer install \
197+
RUN composer dump-autoload \
199198
--classmap-authoritative \
200-
--no-interaction \
201-
--no-ansi \
202199
--no-dev \
203200
&& composer clear-cache
204201

0 commit comments

Comments
 (0)