ini adalah repo pengembangan untuk Ci3 turunan dari bitnami/codeigniter:3.1.11-debian-10-r446
537
ranur/codeigniter:3.19-php8.3-nginxThis repository provides a Docker image for running CodeIgniter with PHP 8.3 and NGINX. It includes support for SSH, Composer, and several key PHP extensions to streamline the development and deployment of your CodeIgniter applications.
intl for internationalization support.pdo_mysql and mysqli for database interaction.xsl for XSLT processing.Before running this image, ensure that you have Docker installed. You will also need Docker Compose to run the container stack. Download it here:
To run the image ranur/codeigniter:3.19-php8.3-nginx, follow these steps:
docker pull ranur/codeigniter:3.19-php8.3-nginx
You can use the following docker-compose.yml configuration to run the container. See the next section for the full file.
In the same directory as your docker-compose.yml, run:
docker-compose up
Create a docker-compose.yml file with the following content:
version: "3.7"
services:
web:
image: ranur/codeigniter:3.19-php8.3-nginx
ports:
- "8009:80" # Web server accessible on port 8009
- "8010:8080" # (optional) another NGINX server port
- "412:22" # SSH port for remote access
container_name: node2_php8
This configuration exposes:
http://localhost:8009/.http://localhost:8010/.Here’s the Dockerfile used to build this image:
FROM dwchiang/nginx-php-fpm:8.2.10-fpm-alpine3.17-nginx-1.24.0
# Update and install required packages: OpenSSH, Git, and ICU library for PHP intl extension
RUN apk update && apk add --no-cache \
openssh \
git \
icu-dev libxslt-dev && \
mkdir /var/run/sshd && \
echo 'root:Simop0@@@' | chpasswd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
# Install PHP intl extension, PDO MySQL, MySQLi, and XSL
RUN docker-php-ext-configure intl && \
docker-php-ext-install intl pdo_mysql mysqli xsl
# Install Composer
RUN apk add --no-cache bash curl && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Verify Composer installation
RUN composer --version
# Expose necessary ports (SSH and HTTP)
EXPOSE 22 80
# Copy application to the appropriate directory
COPY /publish/. /var/www/html/public
# Setup Supervisor
RUN mkdir -p /etc/supervisor/conf.d
COPY supervisord/supervisord.conf /etc/supervisor/supervisord.conf
COPY supervisord/sshd.conf /etc/supervisor/conf.d/sshd.conf
COPY supervisord/nginx.conf /etc/nginx/conf.d/default.conf
# Set working directory to the application's public folder
WORKDIR /var/www/html/public
# Copy start.sh script and grant execute permission
COPY start.sh /start.sh
RUN chmod +x /start.sh
# Run start.sh when the container starts
CMD ["/start.sh"]
This Dockerfile installs essential services like OpenSSH, Git, and Composer, and configures necessary PHP extensions for the smooth operation of your CodeIgniter app.
Once the container is running, you can access the application using the following URL in your browser:
http://localhost:8009/Make sure you’ve mapped the ports correctly in your Docker Compose file to allow external access.
To access the container using SSH (optional for debugging or maintenance), use the following command:
ssh root@localhost -p 412
The default root password is: Simop0@@@
You can change this password in the Dockerfile if needed for production use.
docker-compose.yml and adjust the ports and volumes as necessary for your environment.
This `README.md` provides clear instructions on how to run the new version of the Docker image, along with detailed explanations of the Dockerfile and Docker Compose setup. You can modify it further to fit your specific needs.
Content type
Image
Digest
sha256:d22e76167…
Size
80.5 MB
Last updated
about 2 years ago
docker pull ranur/codeigniter:3.19-php8.3-nginx