Skip to content

Commit c4b5035

Browse files
authored
Merge pull request #130 from magento-commerce/develop
MCLOUD-12025 Cloud Tools Releas
2 parents cf95bd4 + 163a02c commit c4b5035

File tree

86 files changed

+954
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+954
-91
lines changed

.github/.metadata.json

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"templateVersion": "0.1",
2+
"templateVersion": "0.2",
33
"product": {
44
"name": "Magento Cloud Docker",
55
"description": "The Magento Cloud Docker implementation deploys Cloud projects to a local workstation so that you can develop and test your code in a simulated Cloud environment"
66
},
77
"contacts": {
88
"team": {
9-
"name": "Magic Mountain",
10-
"DL": "Grp-magento-cloud-all",
11-
"slackChannel": "magic_mountain"
9+
"name": "Mystic Mountain",
10+
"DL": "Grp-Mystic-Mountain",
11+
"slackChannel": "#mystic-mountain-team"
1212
}
1313
},
1414
"ticketTracker": {
@@ -17,10 +17,8 @@
1717
},
1818
"securityJiraQueue": {
1919
"projectKey": "MAGREQ",
20-
"component": "Magento Cloud Engineering"
20+
"component": "MAGREQ/Magento Cloud Engineering"
2121
}
2222
},
23-
"staticScan": {
24-
"enable": false
25-
}
23+
"productionCodeBranches": ["1.0", "1.1", "1.2", "1.3"]
2624
}

composer.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento-cloud-docker",
33
"description": "Magento Cloud Docker",
44
"type": "magento2-component",
5-
"version": "1.3.6",
5+
"version": "1.3.7",
66
"license": [
77
"OSL-3.0",
88
"AFL-3.0"
@@ -13,10 +13,10 @@
1313
"composer/composer": "^1.4 || ^2.0",
1414
"composer/semver": "@stable",
1515
"illuminate/config": "^5.5||^8.77",
16-
"symfony/config": "^4.4 || ^5.1",
17-
"symfony/console": "^2.8 || ^4.0 || ^5.1",
18-
"symfony/dependency-injection": "^3.3 || ^4.3 || ^5.1",
19-
"symfony/yaml": "^3.3 || ^4.0 || ^5.1"
16+
"symfony/config": "^4.4 || ^5.1|| ^5.4 || ^6.4",
17+
"symfony/console": "^2.8 || ^4.0 || ^5.1 || ^5.4 || ^6.4",
18+
"symfony/dependency-injection": "^3.3 || ^4.3 || ^5.1|| ^5.4 || ^6.4",
19+
"symfony/yaml": "^3.3 || ^4.0 || ^5.1 || ^5.4|| ^6.4"
2020
},
2121
"require-dev": {
2222
"codeception/codeception": "^4.1",
@@ -26,7 +26,7 @@
2626
"codeception/module-rest": "^1.2",
2727
"consolidation/robo": "^1.2 || ^2.0",
2828
"phpmd/phpmd": "@stable",
29-
"phpstan/phpstan": "^0.12",
29+
"phpstan/phpstan": "^1.8",
3030
"phpunit/phpunit": "^8.5 || ^9.5",
3131
"squizlabs/php_codesniffer": "^3.0"
3232
},

config/services.xml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<prototype namespace="Magento\CloudDocker\" resource="../src/*" exclude="../src/{Test}"/>
1010
<service id="Magento\CloudDocker\App\Container" autowire="false"/>
1111
<service id="Magento\CloudDocker\App\ContainerInterface" alias="container"/>
12+
<service id="Psr\Container\ContainerInterface" alias="service_container"/>
1213
<service id="Magento\CloudDocker\App\ContainerException" autowire="false"/>
1314
<service id="Magento\CloudDocker\Compose\BuilderFactory">
1415
<argument key="$strategies" type="collection">

images/nginx/1.19/Dockerfile images/nginx/1.24/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nginx:1.19
1+
FROM nginx:1.24
22

33
ENV UPLOAD_MAX_FILESIZE 64M
44
ENV XDEBUG_HOST fpm_xdebug
File renamed without changes.
File renamed without changes.
File renamed without changes.

images/opensearch/1.3/Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM opensearchproject/opensearch:1.3.0
2+
3+
USER root
4+
RUN yum -y install zip && \
5+
zip -q -d /usr/share/opensearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
6+
yum remove -y zip && \
7+
yum -y clean all && \
8+
rm -rf /var/cache
9+
USER opensearch
10+
11+
RUN bin/opensearch-plugin install -b analysis-icu && \
12+
bin/opensearch-plugin install -b analysis-phonetic
13+
14+
ADD docker-healthcheck.sh /docker-healthcheck.sh
15+
ADD docker-entrypoint.sh /docker-entrypoint.sh
16+
17+
HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"]
18+
19+
ENTRYPOINT ["/docker-entrypoint.sh"]
20+
21+
EXPOSE 9200 9300
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
if [[ -n "$OS_PLUGINS" ]]; then
5+
echo "Installing plugins: $OS_PLUGINS"
6+
for PLUGIN in $OS_PLUGINS
7+
do
8+
./bin/opensearch-plugin install -b "$PLUGIN"
9+
done
10+
fi
11+
12+
/bin/bash /usr/share/opensearch/opensearch-docker-entrypoint.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
if health="$(curl -fsSL "http://${OS_HOST:-opensearch}:${OS_HOST:-9200}/_cat/health?h=status")"; then
5+
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
6+
if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then
7+
exit 0
8+
fi
9+
echo >&2 "Unexpected health status: $health"
10+
fi
11+
12+
exit 1

images/opensearch/2.12/Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM opensearchproject/opensearch:2.12.0
2+
3+
USER root
4+
RUN yum -y install zip && \
5+
zip -q -d /usr/share/opensearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
6+
yum remove -y zip && \
7+
yum -y clean all && \
8+
rm -rf /var/cache
9+
USER opensearch
10+
11+
RUN bin/opensearch-plugin install -b analysis-icu && \
12+
bin/opensearch-plugin install -b analysis-phonetic
13+
14+
ADD docker-healthcheck.sh /docker-healthcheck.sh
15+
ADD docker-entrypoint.sh /docker-entrypoint.sh
16+
17+
HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"]
18+
19+
ENTRYPOINT ["/docker-entrypoint.sh"]
20+
21+
EXPOSE 9200 9300
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
if [[ -n "$OS_PLUGINS" ]]; then
5+
echo "Installing plugins: $OS_PLUGINS"
6+
for PLUGIN in $OS_PLUGINS
7+
do
8+
./bin/opensearch-plugin install -b "$PLUGIN"
9+
done
10+
fi
11+
12+
/bin/bash /usr/share/opensearch/opensearch-docker-entrypoint.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
if health="$(curl -fsSL "http://${OS_HOST:-opensearch}:${OS_HOST:-9200}/_cat/health?h=status")"; then
5+
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
6+
if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then
7+
exit 0
8+
fi
9+
echo >&2 "Unexpected health status: $health"
10+
fi
11+
12+
exit 1

images/php/8.0-cli/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch=
1212

1313
FROM php:8.0.14-cli
1414

15-
ARG COMPOSER_VERSION=2.1.14
15+
ARG COMPOSER_VERSION=2.2.23
1616
ARG MAGENTO_ROOT=/app
1717
ARG COMPOSER_ALLOW_SUPERUSER=1
1818
ARG COMPOSER_HOME=/composer

images/php/8.1-cli/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch=
1212

1313
FROM php:8.1.1-cli
1414

15-
ARG COMPOSER_VERSION=2.1.14
15+
ARG COMPOSER_VERSION=2.2.23
1616
ARG MAGENTO_ROOT=/app
1717
ARG COMPOSER_ALLOW_SUPERUSER=1
1818
ARG COMPOSER_HOME=/composer

images/php/8.2-cli/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch=
1212

1313
FROM php:8.2-cli
1414

15-
ARG COMPOSER_VERSION=2.2.18
15+
ARG COMPOSER_VERSION=2.2.23
1616
ARG MAGENTO_ROOT=/app
1717
ARG COMPOSER_ALLOW_SUPERUSER=1
1818
ARG COMPOSER_HOME=/composer

images/php/8.3-cli/Dockerfile

+193
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
# This file is automatically generated. Do not edit directly. #
2+
FROM golang:1.15 AS builder
3+
4+
RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \
5+
&& wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \
6+
&& tar -xf mhsendmail.tar.gz \
7+
&& mkdir -p ./src/github.com/mailhog/ \
8+
&& mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \
9+
&& cd ./src/github.com/mailhog/mhsendmail/ \
10+
&& go get . \
11+
&& GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail .
12+
13+
FROM php:8.3-cli
14+
15+
ARG COMPOSER_VERSION=2.7.0
16+
ARG MAGENTO_ROOT=/app
17+
ARG COMPOSER_ALLOW_SUPERUSER=1
18+
ARG COMPOSER_HOME=/composer
19+
ARG CRONTAB=""
20+
21+
ENV COMPOSER_MEMORY_LIMIT -1
22+
ENV COMPOSER_ALLOW_SUPERUSER ${COMPOSER_ALLOW_SUPERUSER}
23+
ENV COMPOSER_HOME ${COMPOSER_HOME}
24+
ENV COMPOSER_CLEAR_CACHE false
25+
ENV PHP_MEMORY_LIMIT -1
26+
ENV PHP_VALIDATE_TIMESTAMPS 1
27+
ENV DEBUG false
28+
ENV MAGENTO_RUN_MODE production
29+
ENV SENDMAIL_PATH /dev/null
30+
ENV PHPRC ${MAGENTO_ROOT}/php.ini
31+
32+
ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl
33+
34+
# Configure Node.js version
35+
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash
36+
37+
# Install dependencies
38+
RUN apt-get update \
39+
&& apt-get upgrade -y \
40+
&& apt-get install -y --no-install-recommends \
41+
apt-utils \
42+
cron \
43+
git \
44+
mariadb-client \
45+
nano \
46+
nodejs \
47+
python3 \
48+
python3-pip \
49+
redis-tools \
50+
sendmail-bin \
51+
sendmail \
52+
sudo \
53+
unzip \
54+
vim \
55+
openssh-client \
56+
gnupg2 \
57+
ca-certificates \
58+
lsb-release \
59+
software-properties-common \
60+
libbz2-dev \
61+
libjpeg62-turbo-dev \
62+
libpng-dev \
63+
libfreetype6-dev \
64+
libgmp-dev \
65+
libgpgme11-dev \
66+
libicu-dev \
67+
libldap2-dev \
68+
libpcre3-dev \
69+
libpspell-dev \
70+
libtidy-dev \
71+
libxslt1-dev \
72+
libyaml-dev \
73+
libzip-dev \
74+
zip \
75+
python3-yaml \
76+
&& rm -rf /var/lib/apt/lists/*
77+
78+
# Install Python packages
79+
80+
81+
# Install Grunt
82+
RUN npm install -g grunt-cli
83+
84+
# Install MailHog
85+
COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/
86+
RUN sudo chmod +x /usr/local/bin/mhsendmail
87+
88+
# Configure the gd library
89+
RUN docker-php-ext-configure \
90+
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
91+
RUN docker-php-ext-configure \
92+
opcache --enable-opcache
93+
94+
# Install required PHP extensions
95+
RUN docker-php-ext-install -j$(nproc) \
96+
bcmath \
97+
bz2 \
98+
calendar \
99+
exif \
100+
gd \
101+
gettext \
102+
gmp \
103+
intl \
104+
mysqli \
105+
opcache \
106+
pdo_mysql \
107+
pspell \
108+
shmop \
109+
soap \
110+
sockets \
111+
sysvmsg \
112+
sysvsem \
113+
sysvshm \
114+
tidy \
115+
xsl \
116+
zip \
117+
pcntl
118+
119+
RUN pecl install -o -f \
120+
gnupg \
121+
mailparse \
122+
msgpack \
123+
oauth \
124+
pcov \
125+
raphf \
126+
redis \
127+
xdebug-3.3.0 \
128+
xmlrpc-1.0.0RC3 \
129+
yaml
130+
131+
RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \
132+
&& install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \
133+
&& echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \
134+
&& apt-get update \
135+
&& apt-get install blackfire-php \
136+
&& rm -rf /var/lib/apt/lists/*
137+
RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \
138+
&& docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch}
139+
RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \
140+
&& rm -f /usr/local/lib/php/extensions/*/*sodium.so \
141+
&& apt-get remove libsodium* -y \
142+
&& mkdir -p /tmp/libsodium \
143+
&& curl -sL https://github.com/jedisct1/libsodium/archive/1.0.18-RELEASE.tar.gz | tar xzf - -C /tmp/libsodium \
144+
&& cd /tmp/libsodium/libsodium-1.0.18-RELEASE/ \
145+
&& ./configure \
146+
&& make && make check \
147+
&& make install \
148+
&& cd / \
149+
&& rm -rf /tmp/libsodium \
150+
&& pecl install -o -f libsodium
151+
152+
ADD etc/php-cli.ini /usr/local/etc/php/conf.d/zz-magento.ini
153+
ADD etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini
154+
ADD etc/php-pcov.ini /usr/local/etc/php/conf.d/zz-pcov-settings.ini
155+
ADD etc/mail.ini /usr/local/etc/php/conf.d/zz-mail.ini
156+
ADD etc/php-gnupg.ini /usr/local/etc/php/conf.d/gnupg.ini
157+
158+
# Get composer installed to /usr/local/bin/composer
159+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --version=${COMPOSER_VERSION} --filename=composer
160+
161+
ADD bin/* /usr/local/bin/
162+
163+
RUN groupadd -g 1000 www && useradd -g 1000 -u 1000 -d ${MAGENTO_ROOT} -s /bin/bash www
164+
165+
ADD docker-entrypoint.sh /docker-entrypoint.sh
166+
167+
RUN ["chmod", "+x", \
168+
"/docker-entrypoint.sh", \
169+
"/usr/local/bin/magento-installer", \
170+
"/usr/local/bin/magento-command", \
171+
"/usr/local/bin/mftf-command", \
172+
"/usr/local/bin/ece-command", \
173+
"/usr/local/bin/cloud-build", \
174+
"/usr/local/bin/cloud-deploy", \
175+
"/usr/local/bin/cloud-post-deploy", \
176+
"/usr/local/bin/run-cron", \
177+
"/usr/local/bin/run-hooks" \
178+
]
179+
180+
RUN mkdir -p ${MAGENTO_ROOT}
181+
182+
VOLUME ${MAGENTO_ROOT}
183+
184+
RUN chown -R www:www /usr/local /var/www /var/log /usr/local/etc/php/conf.d /etc/cron.d ${MAGENTO_ROOT} ${COMPOSER_HOME}
185+
RUN if [ ! -z "${CRONTAB}" ]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi
186+
187+
ENTRYPOINT ["/docker-entrypoint.sh"]
188+
189+
WORKDIR ${MAGENTO_ROOT}
190+
191+
USER root
192+
193+
CMD ["bash"]

0 commit comments

Comments
 (0)