Skip to content

Instantly share code, notes, and snippets.

@makinuk
Last active August 28, 2023 18:12
Show Gist options
  • Save makinuk/87c9aced5f226d0cf6076fe205af7f57 to your computer and use it in GitHub Desktop.
Save makinuk/87c9aced5f226d0cf6076fe205af7f57 to your computer and use it in GitHub Desktop.
php 8.2 with docker

create Dockerfile

FROM php:8.2-cli
# INSTALL ZIP TO USE COMPOSER
RUN apt-get update && apt-get install -y \
    zlib1g-dev \
    libzip-dev  \
    unzip  \
    libpq-dev


WORKDIR /app
  • build a new image docker build -t php82 .
  • execute composer install docker run --rm -it --volume $(pwd):/app php82 composer install
  • run a script docker run --rm -it --volume $(pwd):/app php82 php -f src/mtoyayin.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment