forked from bitnami/containers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[bitnami/magento] Deprecate container (bitnami#72466)"
This reverts commit b57312c.
- Loading branch information
Lumiere
committed
Sep 18, 2024
1 parent
f6b4592
commit 8a03b5e
Showing
78 changed files
with
8,223 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright Broadcom, Inc. All Rights Reserved. | ||
# SPDX-License-Identifier: APACHE-2.0 | ||
|
||
gossfile: | ||
# Goss tests exclusive to the current container | ||
../../magento/goss/magento.yaml: {} | ||
# Load scripts from .vib/common/goss/templates | ||
../../common/goss/templates/check-apache-libphp.yaml: {} | ||
../../common/goss/templates/check-app-version.yaml: {} | ||
../../common/goss/templates/check-binaries.yaml: {} | ||
../../common/goss/templates/check-broken-symlinks.yaml: {} | ||
../../common/goss/templates/check-ca-certs.yaml: {} | ||
../../common/goss/templates/check-directories.yaml: {} | ||
../../common/goss/templates/check-sed-in-place.yaml: {} | ||
../../common/goss/templates/check-spdx.yaml: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright Broadcom, Inc. All Rights Reserved. | ||
# SPDX-License-Identifier: APACHE-2.0 | ||
|
||
group: | ||
daemon: | ||
exists: true | ||
user: | ||
daemon: | ||
exists: true | ||
file: | ||
# HTTPs vhost should have been properly rendered | ||
/opt/bitnami/apache/conf/vhosts/magento-https-vhost.conf: | ||
exists: true | ||
filetype: file | ||
contents: | ||
- "SSLEngine on" | ||
- /DocumentRoot.*/opt/bitnami/magento/ | ||
/opt/bitnami/apache/conf/vhosts/htaccess/magento-htaccess.conf: | ||
exists: false | ||
/opt/bitnami/php/etc/php.ini: | ||
exists: true | ||
filetype: file | ||
contents: | ||
- "opcache.consistency_checks = 0" | ||
- "opcache.validate_timestamps = 0" | ||
- "opcache.enable_cli = 1" | ||
command: | ||
check-app-modules: | ||
exec: magento module:enable Magento_Store | ||
exit-status: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
binaries: | ||
- apachectl | ||
- php | ||
- magento | ||
- mysql | ||
- render-template | ||
- wait-for-port | ||
- composer | ||
directories: | ||
- mode: "0775" | ||
owner: daemon | ||
group: root | ||
paths: | ||
- /opt/bitnami/magento | ||
- /bitnami/magento | ||
- /opt/bitnami/magento/tmp | ||
- /opt/bitnami/magento/uploads | ||
version: | ||
bin_name: magento | ||
flag: --version | ||
root_dir: /opt/bitnami | ||
sed_in_place: | ||
exclude_paths: | ||
- /opt/bitnami/magento/vendor/laminas/laminas-http/.laminas-ci/pre-run.sh | ||
- /opt/bitnami/magento/vendor/phpseclib/mcrypt_compat/travis/run-phpunit.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"context": { | ||
"resources": { | ||
"url": "{SHA_ARCHIVE}", | ||
"path": "{VIB_ENV_PATH}" | ||
}, | ||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" | ||
}, | ||
"phases": { | ||
"package": { | ||
"actions": [ | ||
{ | ||
"action_id": "container-image-package", | ||
"params": { | ||
"application": { | ||
"details": { | ||
"name": "{VIB_ENV_CONTAINER}", | ||
"tag": "{VIB_ENV_TAG}" | ||
} | ||
}, | ||
"architectures": [ | ||
"linux/amd64", | ||
"linux/arm64" | ||
] | ||
} | ||
}, | ||
{ | ||
"action_id": "container-image-lint", | ||
"params": { | ||
"threshold": "error" | ||
} | ||
} | ||
] | ||
}, | ||
"verify": { | ||
"actions": [ | ||
{ | ||
"action_id": "goss", | ||
"params": { | ||
"resources": { | ||
"path": "/.vib" | ||
}, | ||
"tests_file": "magento/goss/goss.yaml", | ||
"vars_file": "magento/goss/vars.yaml", | ||
"remote": { | ||
"pod": { | ||
"workload": "deploy-magento" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"action_id": "trivy", | ||
"params": { | ||
"threshold": "LOW", | ||
"vuln_type": [ | ||
"OS" | ||
] | ||
} | ||
}, | ||
{ | ||
"action_id": "grype", | ||
"params": { | ||
"threshold": "CRITICAL", | ||
"package_type": [ | ||
"OS" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Copyright Broadcom, Inc. All Rights Reserved. | ||
# SPDX-License-Identifier: APACHE-2.0 | ||
|
||
FROM docker.io/bitnami/minideb:bookworm | ||
|
||
ARG TARGETARCH | ||
|
||
LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ | ||
org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ | ||
org.opencontainers.image.created="2024-09-05T12:18:05Z" \ | ||
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ | ||
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/magento/README.md" \ | ||
org.opencontainers.image.licenses="Apache-2.0" \ | ||
org.opencontainers.image.ref.name="2.4.7-debian-12-r17" \ | ||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/magento" \ | ||
org.opencontainers.image.title="magento" \ | ||
org.opencontainers.image.vendor="Broadcom, Inc." \ | ||
org.opencontainers.image.version="2.4.7" | ||
|
||
ENV OS_ARCH="${TARGETARCH:-amd64}" \ | ||
OS_FLAVOUR="debian-12" \ | ||
OS_NAME="linux" | ||
|
||
COPY prebuildfs / | ||
SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"] | ||
# Install required system packages and dependencies | ||
RUN install_packages acl ca-certificates cron curl libaudit1 libbrotli1 libbsd0 libbz2-1.0 libcap-ng0 libcom-err2 libcrypt1 libcurl4 libexpat1 libffi8 libfftw3-double3 libfontconfig1 libfreetype6 libgcc-s1 libgcrypt20 libglib2.0-0 libgmp10 libgnutls30 libgomp1 libgpg-error0 libgssapi-krb5-2 libhashkit2 libhogweed6 libicu72 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblcms2-2 libldap-2.5-0 liblqr-1-0 libltdl7 liblzma5 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmd0 libmemcached11 libncurses6 libnettle8 libnghttp2-14 libonig5 libp11-kit0 libpam0g libpcre2-8-0 libpcre3 libpng16-16 libpq5 libpsl5 libreadline8 librtmp1 libsasl2-2 libsodium23 libsqlite3-0 libssh2-1 libssl3 libstdc++6 libsybdb5 libtasn1-6 libtidy5deb1 libtinfo6 libunistring2 libuuid1 libwebp7 libx11-6 libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxslt1.1 libzip4 libzstd1 openssl procps zlib1g | ||
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \ | ||
COMPONENTS=( \ | ||
"render-template-1.0.7-3-linux-${OS_ARCH}-debian-12" \ | ||
"php-8.2.23-1-linux-${OS_ARCH}-debian-12" \ | ||
"apache-2.4.62-3-linux-${OS_ARCH}-debian-12" \ | ||
"wait-for-port-1.0.8-3-linux-${OS_ARCH}-debian-12" \ | ||
"mysql-client-10.6.19-0-linux-${OS_ARCH}-debian-12" \ | ||
"libphp-8.2.23-0-linux-${OS_ARCH}-debian-12" \ | ||
"magento-2.4.7-2-linux-${OS_ARCH}-debian-12" \ | ||
) ; \ | ||
for COMPONENT in "${COMPONENTS[@]}"; do \ | ||
if [ ! -f "${COMPONENT}.tar.gz" ]; then \ | ||
curl -SsLf "https://downloads.bitnami.com/files/stacksmith/${COMPONENT}.tar.gz" -O ; \ | ||
curl -SsLf "https://downloads.bitnami.com/files/stacksmith/${COMPONENT}.tar.gz.sha256" -O ; \ | ||
fi ; \ | ||
sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \ | ||
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' ; \ | ||
rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \ | ||
done | ||
RUN apt-get autoremove --purge -y curl && \ | ||
apt-get update && apt-get upgrade -y && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives | ||
RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true | ||
RUN sed -i -e '/pam_loginuid.so/ s/^#*/#/' /etc/pam.d/cron | ||
|
||
COPY rootfs / | ||
RUN /opt/bitnami/scripts/apache/postunpack.sh | ||
RUN /opt/bitnami/scripts/php/postunpack.sh | ||
RUN /opt/bitnami/scripts/apache-modphp/postunpack.sh | ||
RUN /opt/bitnami/scripts/magento/postunpack.sh | ||
RUN /opt/bitnami/scripts/mysql-client/postunpack.sh | ||
ENV APACHE_HTTPS_PORT_NUMBER="" \ | ||
APACHE_HTTP_PORT_NUMBER="" \ | ||
APP_VERSION="2.4.7" \ | ||
BITNAMI_APP_NAME="magento" \ | ||
PATH="/opt/bitnami/common/bin:/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/apache/bin:/opt/bitnami/mysql/bin:/opt/bitnami/magento/bin:$PATH" | ||
|
||
EXPOSE 8080 8443 | ||
|
||
ENTRYPOINT [ "/opt/bitnami/scripts/magento/entrypoint.sh" ] | ||
CMD [ "/opt/bitnami/scripts/magento/run.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright Broadcom, Inc. All Rights Reserved. | ||
# SPDX-License-Identifier: APACHE-2.0 | ||
|
||
services: | ||
mariadb: | ||
image: docker.io/bitnami/mariadb:10.6 | ||
environment: | ||
# ALLOW_EMPTY_PASSWORD is recommended only for development. | ||
- ALLOW_EMPTY_PASSWORD=yes | ||
- MARIADB_USER=bn_magento | ||
- MARIADB_DATABASE=bitnami_magento | ||
volumes: | ||
- 'mariadb_data:/bitnami/mariadb' | ||
magento: | ||
image: docker.io/bitnami/magento:2 | ||
ports: | ||
- '80:8080' | ||
- '443:8443' | ||
environment: | ||
- MAGENTO_HOST=localhost | ||
- MAGENTO_DATABASE_HOST=mariadb | ||
- MAGENTO_DATABASE_PORT_NUMBER=3306 | ||
- MAGENTO_DATABASE_USER=bn_magento | ||
- MAGENTO_DATABASE_NAME=bitnami_magento | ||
- ELASTICSEARCH_HOST=elasticsearch | ||
- ELASTICSEARCH_PORT_NUMBER=9200 | ||
# ALLOW_EMPTY_PASSWORD is recommended only for development. | ||
- ALLOW_EMPTY_PASSWORD=yes | ||
volumes: | ||
- 'magento_data:/bitnami/magento' | ||
depends_on: | ||
- mariadb | ||
- elasticsearch | ||
elasticsearch: | ||
image: docker.io/bitnami/elasticsearch:7 | ||
volumes: | ||
- 'elasticsearch_data:/bitnami/elasticsearch/data' | ||
volumes: | ||
mariadb_data: | ||
driver: local | ||
magento_data: | ||
driver: local | ||
elasticsearch_data: | ||
driver: local |
44 changes: 44 additions & 0 deletions
44
bitnami/magento/2/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"apache": { | ||
"arch": "amd64", | ||
"distro": "debian-12", | ||
"type": "NAMI", | ||
"version": "2.4.62-3" | ||
}, | ||
"libphp": { | ||
"arch": "amd64", | ||
"distro": "debian-12", | ||
"type": "NAMI", | ||
"version": "8.2.23-0" | ||
}, | ||
"magento": { | ||
"arch": "amd64", | ||
"distro": "debian-12", | ||
"type": "NAMI", | ||
"version": "2.4.7-2" | ||
}, | ||
"mysql-client": { | ||
"arch": "amd64", | ||
"distro": "debian-12", | ||
"type": "NAMI", | ||
"version": "10.6.19-0" | ||
}, | ||
"php": { | ||
"arch": "amd64", | ||
"distro": "debian-12", | ||
"type": "NAMI", | ||
"version": "8.2.23-1" | ||
}, | ||
"render-template": { | ||
"arch": "amd64", | ||
"distro": "debian-12", | ||
"type": "NAMI", | ||
"version": "1.0.7-3" | ||
}, | ||
"wait-for-port": { | ||
"arch": "amd64", | ||
"distro": "debian-12", | ||
"type": "NAMI", | ||
"version": "1.0.8-3" | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
bitnami/magento/2/debian-12/prebuildfs/opt/bitnami/licenses/licenses.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Bitnami containers ship with software bundles. You can find the licenses under: | ||
/opt/bitnami/[name-of-bundle]/licenses/[bundle-version].txt |
54 changes: 54 additions & 0 deletions
54
bitnami/magento/2/debian-12/prebuildfs/opt/bitnami/scripts/libbitnami.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
# Copyright Broadcom, Inc. All Rights Reserved. | ||
# SPDX-License-Identifier: APACHE-2.0 | ||
# | ||
# Bitnami custom library | ||
|
||
# shellcheck disable=SC1091 | ||
|
||
# Load Generic Libraries | ||
. /opt/bitnami/scripts/liblog.sh | ||
|
||
# Constants | ||
BOLD='\033[1m' | ||
|
||
# Functions | ||
|
||
######################## | ||
# Print the welcome page | ||
# Globals: | ||
# DISABLE_WELCOME_MESSAGE | ||
# BITNAMI_APP_NAME | ||
# Arguments: | ||
# None | ||
# Returns: | ||
# None | ||
######################### | ||
print_welcome_page() { | ||
if [[ -z "${DISABLE_WELCOME_MESSAGE:-}" ]]; then | ||
if [[ -n "$BITNAMI_APP_NAME" ]]; then | ||
print_image_welcome_page | ||
fi | ||
fi | ||
} | ||
|
||
######################## | ||
# Print the welcome page for a Bitnami Docker image | ||
# Globals: | ||
# BITNAMI_APP_NAME | ||
# Arguments: | ||
# None | ||
# Returns: | ||
# None | ||
######################### | ||
print_image_welcome_page() { | ||
local github_url="https://github.com/bitnami/containers" | ||
|
||
info "" | ||
info "${BOLD}Welcome to the Bitnami ${BITNAMI_APP_NAME} container${RESET}" | ||
info "Subscribe to project updates by watching ${BOLD}${github_url}${RESET}" | ||
info "Submit issues and feature requests at ${BOLD}${github_url}/issues${RESET}" | ||
info "Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit ${BOLD}https://bitnami.com/enterprise${RESET}" | ||
info "" | ||
} | ||
|
Oops, something went wrong.