š (PHP / Slim) Production-ready Docker images with automatic Slim installer.
100K+
š (PHP / Slim) Production-ready Docker images with automatic Slim installer.
The Docker images are available for both Debian and Alpine versions.
Our PHP Docker images, available on Docker Hubā , let you configure PHP and PHP-FPM settings through environment variables, with no image rebuild required.
These images also include the latest version of Composerā .
Check out our documentationā to learn how to customize these Docker images for your projects.
When you mount an empty directory into the container, it will automatically download the entire source code for the framework, allowing you to bootstrap a new project quickly.
mkdir slim
docker run -p 80:80 -p 443:443 -p 443:443/udp \
-v ./slim:/var/www/html \
shinsenter/slim:latest
The container will detect the empty directory mounted to /var/www/html and clone the framework source code into it.
You can mount your application code from your host machine to the /var/www/html directory inside the container.
Because the source code is mounted as a volume, any changes made on the host machine are reflected inside the container.
The Docker images come with pre-generated SSL certificate files for testing HTTPS locally:
To use valid HTTPS certificates in production, replace these files with your own certificate and key. Copy or mount your certificates from the host machine into the container, overwriting the default files.
FROM shinsenter/slim:latest
# Copy your own certs into the container
COPY my_domain.crt /etc/ssl/site/server.crt
COPY my_domain.key /etc/ssl/site/server.key
# Add your instructions here
# For example:
# ADD --chown=$APP_USER:$APP_GROUP ./slim/ /var/www/html/
docker run -p 80:80 -p 443:443 -p 443:443/udp \
-v ./slim:/var/www/html \
-v ./my_domain.crt:/etc/ssl/site/server.crt \
-v ./my_domain.key:/etc/ssl/site/server.key \
shinsenter/slim:latest
services:
web:
image: shinsenter/slim:latest
volumes:
- ./slim:/var/www/html
- ./my_domain.crt:/etc/ssl/site/server.crt
- ./my_domain.key:/etc/ssl/site/server.key
The release versions on this GitHub repositoryā don't guarantee that Docker images built from the same source code will always be identical.
We build new Docker images daily to ensure they stay up-to-date with the latest upstream updates for PHP, base OS, Composer, etc. The images in this repo are regularly updated under the same tag names.
But you can pull the image from shinsenter/slim:latest,
and tag it with a name that indicates its stability,
such as your-repo/slim:stable using the below commands:
docker pull shinsenter/slim:latest
docker tag shinsenter/slim:latest your-repo/slim:stable
docker push your-repo/slim:stable
Then use the image your-repo/slim:stable as a base image to build containers for production.
If you find these images useful, consider donating via PayPalā or opening an issue on GitHubā .
This project is licensed under the terms of the GNU General Public License v3.0ā .
Please respect the work that went into these images. If you reuse ideas from this project, credit is appreciated.
From Vietnam š»š³ with love.
Content type
Image
Digest
sha256:a807598a4ā¦
Size
102.7 MB
Last updated
about 18 hours ago
docker pull shinsenter/slimPulls:
4,084
Last week