1
1
ARG PHP_VERSION=php74-fpm
2
2
FROM michielgerritsen/magento2-base-image:${PHP_VERSION}
3
3
4
- ARG MAGEOS_VERSION=2.4.4
4
+ ARG MAGEOS_VERSION=1.0.0
5
5
ARG MAGEOS_TYPE=project-community-edition
6
6
ARG SAMPLE_DATA=false
7
7
@@ -11,13 +11,7 @@ ENV FLAT_TABLES=false
11
11
ENV COMPOSER_ALLOW_SUPERUSER=1
12
12
13
13
COPY scripts/retry retry
14
- COPY patches/ patches/
15
- COPY scripts/apply-2.4-patches.php scripts/apply-2.4-patches.php
16
- COPY scripts/downgrade-monolog.php scripts/downgrade-monolog.php
17
- COPY scripts/upgrade-to-composer-2.php scripts/upgrade-to-composer-2.php
18
14
COPY scripts/allow-composer-plugins.php scripts/allow-composer-plugins.php
19
- COPY scripts/remove-paypal-braintree.php scripts/remove-paypal-braintree.php
20
- COPY scripts/patch-AC2855.php scripts/patch-AC2855.php
21
15
COPY templates/memory-limit-php.ini /usr/local/etc/php/conf.d/memory-limit-php.ini
22
16
23
17
RUN set -e; \
@@ -26,21 +20,14 @@ RUN set -e; \
26
20
echo "[cad] Composer version:" && \
27
21
composer --version && \
28
22
echo "[cad] Downloading & unzipping Magento" && \
29
- curl -o mage-os.zip https://repo.mage-os.org/dist/magento/$MAGEOS_TYPE/magento-$MAGEOS_TYPE-$MAGEOS_VERSION.zip && \
30
- unzip -q mage-os.zip -d . && \
31
- rm mage-os.zip; \
23
+ composer create-project --repository-url=https://repo.mage-os.org/ mage-os/project-community-edition:"$MAGEOS_VERSION" .
32
24
echo "[cad] Allowing composer plugins" && \
33
25
php scripts/allow-composer-plugins.php && \
34
26
rm scripts/allow-composer-plugins.php && \
35
- echo "[cad] Upgrading to composer 2" && \
36
- php scripts/upgrade-to-composer-2.php && \
37
- rm scripts/upgrade-to-composer-2.php && \
38
- if [ "$MAGEOS_VERSION" != "2.4.9-alpha2" ]; then \
27
+ if [ "$MAGEOS_VERSION" != "alpha2" ]; then \
39
28
composer config --unset repositories.0 && \
40
29
composer config repositories.fooman composer https://repo-magento-mirror.fooman.co.nz/; \
41
30
fi && \
42
- if [ "$MAGEOS_VERSION" = "2.4.4" ]; then composer require "magento/security-package:1.1.3-p1 as 1.1.3" --no-update; fi && \
43
- if [ "$MAGEOS_VERSION" = "2.4.4" ]; then composer require "magento/inventory-metapackage:1.2.4-p1 as 1.2.4" --no-update; fi && \
44
31
echo "[cad] Running Composer install" && \
45
32
./retry "composer install" && \
46
33
php scripts/patch-AC2855.php && \
@@ -55,8 +42,8 @@ RUN set -e; \
55
42
php bin/magento setup:install --backend-frontname=admin --session-save=db --db-host=127.0.0.1 --db-name=magento --db-user=magento --db-password=password --base-url=http://localhost --timezone=Europe/Amsterdam --currency=EUR --admin-user=exampleuser --admin-password=examplepassword123 --admin-email=user@example.com --admin-firstname=Example --admin-lastname=Example --use-rewrites=1 --use-sample-data && \
56
43
echo "[cad] Setting developer mode" && \
57
44
php bin/magento deploy:mode:set developer && \
58
- if [ "${SAMPLE_DATA}" = "true" ] && [ "$MAGEOS_VERSION" != "2.4.9- alpha2" ]; then echo "[cad] Running php bin/magento sampledata:deploy" ; php bin/magento sampledata:deploy; fi && \
59
- if [ "${SAMPLE_DATA}" = "true" ] && [ "$MAGEOS_VERSION" = "2.4.9- alpha2" ]; then echo "[cad] Installing sampledata" ; composer require mage-os/module-bundle-sample-data mage-os/module-catalog-sample-data mage-os/module-sales-sample-data mage-os/module-customer-sample-data mage-os/module-cms-sample-data mage-os/module-widget-sample-data mage-os/module-theme-sample-data mage-os/module-downloadable-sample-data mage-os/module-wishlist-sample-data mage-os/module-review-sample-data mage-os/module-tax-sample-data mage-os/module-catalog-rule-sample-data mage-os/module-configurable-sample-data mage-os/module-product-links-sample-data mage-os/module-sales-rule-sample-data mage-os/module-msrp-sample-data mage-os/module-grouped-product-sample-data mage-os/module-swatches-sample-data mage-os/module-offline-shipping-sample-data magento/sample-data-media --ignore-platform-reqs; fi && \
45
+ if [ "${SAMPLE_DATA}" = "true" ] && [ "$MAGEOS_VERSION" != "alpha2" ]; then echo "[cad] Running php bin/magento sampledata:deploy" ; php bin/magento sampledata:deploy; fi && \
46
+ if [ "${SAMPLE_DATA}" = "true" ] && [ "$MAGEOS_VERSION" = "alpha2" ]; then echo "[cad] Installing sampledata" ; composer require mage-os/module-bundle-sample-data mage-os/module-catalog-sample-data mage-os/module-sales-sample-data mage-os/module-customer-sample-data mage-os/module-cms-sample-data mage-os/module-widget-sample-data mage-os/module-theme-sample-data mage-os/module-downloadable-sample-data mage-os/module-wishlist-sample-data mage-os/module-review-sample-data mage-os/module-tax-sample-data mage-os/module-catalog-rule-sample-data mage-os/module-configurable-sample-data mage-os/module-product-links-sample-data mage-os/module-sales-rule-sample-data mage-os/module-msrp-sample-data mage-os/module-grouped-product-sample-data mage-os/module-swatches-sample-data mage-os/module-offline-shipping-sample-data magento/sample-data-media --ignore-platform-reqs; fi && \
60
47
if [ "${SAMPLE_DATA}" = "true" ]; then echo "[cad] Running setup:upgrade" && ./retry "php bin/magento setup:upgrade" ; fi && \
61
48
php bin/magento setup:static-content:deploy en_US -f -j 12 && \
62
49
php bin/magento setup:di:compile && \
@@ -74,16 +61,15 @@ COPY templates/install-config-mysql.php dev/tests/integration/etc/
74
61
COPY templates/post-install-setup-command-config.php dev/tests/integration/etc/
75
62
COPY entrypoint.sh entrypoint.sh
76
63
77
- COPY scripts/enable-flat-catalog enable-flat-catalog
78
64
COPY scripts/change-base-url change-base-url
79
65
COPY scripts/install-composer-package install-composer-package
80
66
COPY scripts/disable-2fa disable-2fa
81
67
82
- COPY templates/phpunit-integration.xml dev/tests/integration/phpunit.xml
83
- COPY templates/phpunit-integration-248.xml dev/tests/integration/phpunit-248.xml
84
- COPY templates/phpunit-unit.xml dev/tests/unit/phpunit.xml
85
- COPY templates/phpunit-unit-248.xml dev/tests/unit/phpunit-248.xml
86
- COPY scripts/fix-phpunit.xml.php fix-phpunit.xml.php
68
+ # COPY templates/phpunit-integration.xml dev/tests/integration/phpunit.xml
69
+ # COPY templates/phpunit-integration-248.xml dev/tests/integration/phpunit-248.xml
70
+ # COPY templates/phpunit-unit.xml dev/tests/unit/phpunit.xml
71
+ # COPY templates/phpunit-unit-248.xml dev/tests/unit/phpunit-248.xml
72
+ # COPY scripts/fix-phpunit.xml.php fix-phpunit.xml.php
87
73
88
74
RUN chmod +x enable-flat-catalog && \
89
75
chmod +x change-base-url && \
0 commit comments