diff --git a/bitnami/codeigniter/4/debian-11/Dockerfile b/bitnami/codeigniter/4/debian-11/Dockerfile index 2efcab4d1c63..070f535c063c 100644 --- a/bitnami/codeigniter/4/debian-11/Dockerfile +++ b/bitnami/codeigniter/4/debian-11/Dockerfile @@ -7,10 +7,10 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:1e1b4657a77f0d47e9220f0c37b9bf7802581b93214fff7d1bd2364c8bf22e8e" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \ - org.opencontainers.image.created="2023-12-28T12:47:42Z" \ + org.opencontainers.image.created="2024-01-19T17:12:49Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="4.4.4-debian-11-r0" \ + org.opencontainers.image.ref.name="4.4.4-debian-11-r1" \ org.opencontainers.image.title="codeigniter" \ org.opencontainers.image.vendor="VMware, Inc." \ org.opencontainers.image.version="4.4.4" @@ -25,7 +25,7 @@ SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"] RUN install_packages ca-certificates curl libaudit1 libbrotli1 libbsd0 libbz2-1.0 libcap-ng0 libcom-err2 libcurl4 libexpat1 libffi7 libfftw3-double3 libfontconfig1 libfreetype6 libgcc-s1 libgcrypt20 libglib2.0-0 libgmp10 libgnutls30 libgomp1 libgpg-error0 libgssapi-krb5-2 libhogweed6 libicu67 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblcms2-2 libldap-2.4-2 liblqr-1-0 libltdl7 liblzma5 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmd0 libmemcached11 libncurses6 libnettle8 libnghttp2-14 libonig5 libp11-kit0 libpam0g libpcre3 libpng16-16 libpq5 libpsl5 libreadline8 librtmp1 libsasl2-2 libsodium23 libsqlite3-0 libssh2-1 libssl1.1 libstdc++6 libsybdb5 libtasn1-6 libtidy5deb1 libtinfo6 libunistring2 libuuid1 libwebp6 libx11-6 libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxslt1.1 libzip4 procps sudo zlib1g RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \ COMPONENTS=( \ - "php-8.1.27-0-linux-${OS_ARCH}-debian-11" \ + "php-8.1.27-1-linux-${OS_ARCH}-debian-11" \ "mysql-client-11.2.2-0-linux-${OS_ARCH}-debian-11" \ "codeigniter-4.4.4-0-linux-${OS_ARCH}-debian-11" \ ) ; \ @@ -41,6 +41,7 @@ RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \ RUN apt-get update && apt-get upgrade -y && \ apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives RUN /build/bitnami-user.sh +RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true COPY rootfs / RUN /opt/bitnami/scripts/codeigniter/postunpack.sh diff --git a/bitnami/codeigniter/4/debian-11/docker-compose.yml b/bitnami/codeigniter/4/debian-11/docker-compose.yml deleted file mode 100644 index ae63901d18e3..000000000000 --- a/bitnami/codeigniter/4/debian-11/docker-compose.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright VMware, Inc. -# SPDX-License-Identifier: APACHE-2.0 - -version: '2' - -services: - mariadb: - image: docker.io/bitnami/mariadb:11.2 - environment: - # ALLOW_EMPTY_PASSWORD is recommended only for development. - - ALLOW_EMPTY_PASSWORD=yes - - MARIADB_USER=bn_myapp - - MARIADB_DATABASE=bitnami_myapp - myapp: - image: docker.io/bitnami/codeigniter:4 - ports: - - '8000:8000' - environment: - # ALLOW_EMPTY_PASSWORD is recommended only for development. - - ALLOW_EMPTY_PASSWORD=yes - - CODEIGNITER_DATABASE_HOST=mariadb - - CODEIGNITER_DATABASE_PORT_NUMBER=3306 - - CODEIGNITER_DATABASE_USER=bn_myapp - - CODEIGNITER_DATABASE_NAME=bitnami_myapp - volumes: - - './my-project:/app' - depends_on: - - mariadb diff --git a/bitnami/codeigniter/4/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/codeigniter/4/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json index 3affeac14abc..b9ec2b0f3271 100644 --- a/bitnami/codeigniter/4/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/codeigniter/4/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json @@ -15,6 +15,6 @@ "arch": "amd64", "distro": "debian-11", "type": "NAMI", - "version": "8.1.27-0" + "version": "8.1.27-1" } } \ No newline at end of file diff --git a/bitnami/codeigniter/4/debian-11/prebuildfs/usr/sbin/run-script b/bitnami/codeigniter/4/debian-11/prebuildfs/usr/sbin/run-script index b7a5bf1e50bf..4ca0f897277e 100755 --- a/bitnami/codeigniter/4/debian-11/prebuildfs/usr/sbin/run-script +++ b/bitnami/codeigniter/4/debian-11/prebuildfs/usr/sbin/run-script @@ -10,7 +10,7 @@ fi script=$1 exit_code="${2:-96}" -fail_if_not_present="${3:-y}" +fail_if_not_present="${3:-n}" if test -f "$script"; then sh $script diff --git a/bitnami/codeigniter/README.md b/bitnami/codeigniter/README.md index 6b43ba63052c..ece4f5e0a51f 100644 --- a/bitnami/codeigniter/README.md +++ b/bitnami/codeigniter/README.md @@ -13,12 +13,9 @@ Trademarks: This software listing is packaged by Bitnami. The respective tradema ```console mkdir ~/myapp && cd ~/myapp -curl -LO https://raw.githubusercontent.com/bitnami/containers/main/bitnami/codeigniter/docker-compose.yml -docker-compose up +docker run --name codeigniter -v ${PWD}/my-project:/app bitnami/codeigniter:latest ``` -**Warning**: This quick setup is only intended for development environments. You are encouraged to change the insecure default credentials and check out the available configuration options for the [MariaDB container](https://github.com/bitnami/containers/blob/main/bitnami/mariadb#readme) for a more secure deployment. - ## Why use Bitnami Images? * Bitnami closely tracks upstream source changes and promptly publishes new versions of this image using our automated systems. @@ -48,56 +45,88 @@ Subscribe to project updates by watching the [bitnami/containers GitHub repo](ht ## Getting started -The quickest way to get started with the Bitnami CodeIgniter Development Container is using [docker-compose](https://docs.docker.com/compose/). +CodeIgniter requires access to a MySQL or MariaDB database to store information. We'll use the [Bitnami Docker Image for MariaDB](https://github.com/bitnami/containers/tree/main/bitnami/mariadb) for the database requirements. -Begin by creating a directory for your CodeIgniter application: +### Step 1: Create a network ```console -mkdir ~/myapp -cd ~/myapp +docker network create codeigniter-network ``` -Download the [docker-compose.yml](https://raw.githubusercontent.com/bitnami/containers/main/bitnami/codeigniter/docker-compose.yml) file in the application directory: +### Step 2: Create a volume for MariaDB persistence and create a MariaDB container ```console -curl -LO https://raw.githubusercontent.com/bitnami/containers/main/bitnami/codeigniter/docker-compose.yml +$ docker volume create --name mariadb_data +docker run -d --name mariadb \ + --env ALLOW_EMPTY_PASSWORD=yes \ + --env MARIADB_USER=bn_myapp \ + --env MARIADB_DATABASE=bitnami_myapp \ + --network codeigniter-network \ + --volume mariadb_data:/bitnami/mariadb \ + bitnami/mariadb:latest ``` -Finally launch the CodeIgniter application development environment using: +### Step 3: Launch the container using the local current directory as volume ```console -docker-compose up +$ docker run -d --name codeigniter \ + -p 8000:8000 \ + --env DB_HOST=mariadb \ + --env DB_PORT=3306 \ + --env DB_USERNAME=bn_myapp \ + --env DB_DATABASE=bitnami_myapp \ + --network codeigniter-network \ + --volume ${PWD}/my-project:/app \ + bitnami/codeigniter:latest ``` -The above command creates a container service for CodeIgniter development and bootstraps a new CodeIgniter application, named `myapp` in working directory. You can use your favorite IDE for developing the application. +Among other things, the above command creates a container service, named `myapp`, for CodeIgniter development and bootstraps a new CodeIgniter application in the application directory. You can use your favorite IDE for developing the application. -After the builtin PHP application server has been launched, visit `http://localhost:8000` in your favorite web browser and you'll be greeted the CodeIgniter welcome page. +> **Note** +> +> If the application directory contained the source code of an existing CodeIgniter application, the Bitnami CodeIgniter Development Container would load the existing application instead of bootstrapping a new one. + +After the application server has been launched in the `myapp` service, visit `http://localhost:8000` in your favorite web browser and you'll be greeted by the default CodeIgniter welcome page. + +**Warning**: This quick setup is only intended for development environments. You are encouraged to change the insecure default credentials and check out the available configuration options for the [MariaDB container](https://github.com/bitnami/containers/blob/main/bitnami/mariadb#readme) for a more secure deployment. + +### Environment variables + +#### Customizable environment variables + +| Name | Description | Default Value | +|------------------------------------|------------------------------|-----------------| +| `CODEIGNITER_PORT_NUMBER` | CodeIgniter server port. | `8000` | +| `CODEIGNITER_PROJECT_NAME` | CodeIgniter project name. | `myapp` | +| `CODEIGNITER_SKIP_DATABASE` | Skip database configuration. | `no` | +| `CODEIGNITER_DATABASE_HOST` | Database server host. | `mariadb` | +| `CODEIGNITER_DATABASE_PORT_NUMBER` | Database server port. | `3306` | +| `CODEIGNITER_DATABASE_NAME` | Database name. | `bitnami_myapp` | +| `CODEIGNITER_DATABASE_USER` | Database user name. | `bn_myapp` | + +#### Read-only environment variables + +| Name | Description | Value | +|------------------------|-------------------------------------|-----------------------------------| +| `CODEIGNITER_BASE_DIR` | CodeIgniter installation directory. | `${BITNAMI_ROOT_DIR}/codeigniter` | ## Executing commands -Commands can be launched inside the `myapp` CodeIgniter Development Container with `docker-compose` using the [exec](https://docs.docker.com/compose/reference/exec/) command. - -> **Note**: -> -> The `exec` command was added to `docker-compose` in release [1.7.0](https://github.com/docker/compose/blob/master/CHANGELOG.md#170-2016-04-13). Please ensure that you're using `docker-compose` version `1.7.0` or higher. +Commands can be launched inside the `myapp` CodeIgniter Development Container with `docker` using the [exec](https://docs.docker.com/engine/reference/commandline/exec/) command. The general structure of the `exec` command is: ```console -docker-compose exec +docker exec ``` -where `` is the name of the container service as described in the `docker-compose.yml` file and `` is the command you want to launch inside the service. +where `` is the command you want to launch inside the container. -Following are a few examples: +## Notable Changes -* Create a new project named `foo`: +### Starting January 16, 2024 - ```console - docker-compose run myapp nami execute codeigniter createProject foo - ``` - - Additionally, in the `docker-compose.yml` file you need to update the `CODEIGNITER_PROJECT_NAME` environment variable to `foo` so that the built-in PHP application server serves the application from the `foo` directory. +* The `docker-compose.yaml` file has been removed, as it was solely intended for internal testing purposes. ## Issues