You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rjsocha edited this page Jun 19, 2021
·
1 revision
Merge (ONBUILD) mode usage
First import your extensions:
FROM wyga/php-ext-intl:7.4
FROM wyga/php-ext-imap:7.4
FROM wyga/php-ext-mcrypt:7.4
FROM wyga/php-ext-memcached:7.4
FROM wyga/php-ext-pgsql:7.4
FROM wyga/php-ext-zip:7.4
Count number of FROM's. In this example we have 6. Merge previous imports with wyga/merge.
Put 6 as a tag (number of previous imports) and put merge as stage name (important!).
FROM wyga/merge:6 AS merge
Lastly add wyga/php-merge
FROM wyga/php-merge:7.4
And build your image.
Above example is equivalent to this:
FROM wyga/php-ext-intl:7.4
FROM wyga/php-ext-imap:7.4
FROM wyga/php-ext-mcrypt:7.4
FROM wyga/php-ext-memcached:7.4
FROM wyga/php-ext-pgsql:7.4
FROM wyga/php-ext-zip:7.4
FROM wyga/php:7.4
COPY --from=0 / /
COPY --from=1 / /
COPY --from=2 / /
COPY --from=3 / /
COPY --from=4 / /
COPY --from=5 / /
RUN wyga-php-setup