Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating dockerfiles and entrypoint files according to latest system requirements of adobe commerce (magento open source) on-premises #34

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

@lfluvisotto lfluvisotto force-pushed the dockerfile-entrypoint branch 2 times, most recently from 19eecd1 to a81468b Compare August 9, 2024 04:03
@@ -3,6 +3,7 @@ FROM quay.io/centos/centos:stream9
ARG PHP_VERSION
ARG PHP_EXTENSIONS="bcmath cli common gd gmp intl json mbstring \
mcrypt sodium mysqlnd pgsql opcache pdo pdo_pgsql pecl-msgpack pecl-amqp pecl-redis pecl-imagick pecl-zip pecl-openswoole process soap xml xmlrpc"
ARG COMPOSER_VERSION=2.7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lfluvisotto Rather than locking us into version 2.7, I think it would be better if we use a more generic tag like latest or simply the major version number 2. Right now the "latest" tag and the "2" tag in Docker Hub refer to the same image hash.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bap14, good catch, it went unnoticed by me, changed, please, check again.

image

.gitignore Outdated
@@ -0,0 +1,3 @@
/.sync
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be committed. These ignores are specific to your computer and should be ignored via a global ignore

https://sebastiandedeyne.com/setting-up-a-global-gitignore-file/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@navarr interesting approach, file .gitignore removed from PR.

Should we apply the same approach in https://github.com/wardenenv/warden/blob/main/.gitignore ?

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer2
COPY --from=composer:2.2 /usr/bin/composer /usr/bin/composer2lts
COPY --from=composer:${COMPOSER_VERSION} /usr/bin/composer /usr/bin/composer2
COPY --from=composer:lts /usr/bin/composer /usr/bin/composer2lts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see a future where lts is not 2 and everything breaks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@navarr reverted as it was.

@lfluvisotto lfluvisotto force-pushed the dockerfile-entrypoint branch 2 times, most recently from 87e5f03 to 36ca781 Compare August 11, 2024 22:50
@lfluvisotto
Copy link
Contributor Author

lfluvisotto commented Aug 11, 2024

@navarr , @bap14 , explanation about if conditional in php-fpm/context/docker-entrypoint


First if Condition

if [[ "$COMPOSER_VERSION" =~ ^1(\.[0-9]+){0,2}$ ]]; then
  sudo cp /usr/bin/composer1 /usr/bin/composer

This checks if COMPOSER_VERSION matches the pattern 1, 1.x, or 1.x.x (where x is one or more digits).


Second elif Condition

elif [[ "$COMPOSER_VERSION" =~ ^2\.2(\.[0-9]+)?$ ]]; then
  sudo cp /usr/bin/composer2lts /usr/bin/composer

This checks if COMPOSER_VERSION matches the pattern 2.2 or 2.2.x (where x is one or more digits).


Third elif Condition

elif [[ "$COMPOSER_VERSION" =~ ^2(\.[0-9]+){0,2}$ ]]; then
  sudo cp /usr/bin/composer2 /usr/bin/composer

This checks if COMPOSER_VERSION matches the pattern 2, 2.x, or 2.x.x (where x is one or more digits).


else Condition

else 
  sudo cp /usr/bin/composer2 /usr/bin/composer

If none of the above conditions are met, this else block will execute.

@lfluvisotto lfluvisotto requested a review from bap14 August 11, 2024 22:53
…requirements of adobe commerce (magento open source) on-premises
@navarr navarr merged commit 0487eb1 into wardenenv:main Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants