Skip to content

OlaPom/php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Docker for application development

Docker images that can be used for applicaiton development/ci-cd and for production. These images are based on official PHP images

ko-fi

SDK

Images for use in CI/CD and for application development

This image contains:

Runtime

This image can be used for application in production environment

This image contains:

Versions

Use sdk:latest for latest build or use wanted version e.g. sdk:8.1.6.

Usage

For docker you can use docker pull ghcr.io/maymeow/php/{imagename}:latest where image name is sdk or runtime.

In docker compose use:

image: ghcr.io/maymeow/php/runtime:latest
# Or for SDK
image: ghcr.io/maymeow/php/sdk:latest

Creating image for production environment

Runtime image does not contains composer so you need to install all composer dependencies first.

You can create image with multistep build like this

FROM ghcr.io/maymeow/php/sdk:latest AS build-env

WORKDIR /app
COPY . /app
RUN composer install --no-ansi --no-dev --no-interaction --no-plugins --no-progress --optimize-autoloader #--no-scripts

FROM ghcr.io/maymeow/php/runtime:latest

ARG user=www-data
COPY --from=build-env /app /var/www
RUN chown -R $user:$user /var/www
WORKDIR /var/www
RUN chmod -R 777 /var/www/logs
USER $user

License: MIT

About

🐳 SDK and Runtime for application development for PHP

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Dockerfile 100.0%