Skip to content

Commit

Permalink
Merge pull request #3 from retailcrm/docker-env
Browse files Browse the repository at this point in the history
Docker environment for development
  • Loading branch information
muxx authored Oct 21, 2024
2 parents 60006a7 + 5c3bbdf commit 9a8a51f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ARG PHP_IMAGE_TAG
FROM php:${PHP_IMAGE_TAG}-cli-alpine

COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

WORKDIR /opt/test
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PHP=php
PHP=docker-compose run --rm --no-deps php

vendor: composer.json
@$(PHP) composer install -o -n --no-ansi
Expand All @@ -13,4 +13,4 @@ php-cs: vendor
phpstan: vendor
@$(PHP) vendor/bin/phpstan analyse

check: php-cs phpunit
check: php-cs phpstan phpunit
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
php:
build:
context: .
args:
PHP_IMAGE_TAG: ${PHP_IMAGE_TAG:-8.3}
volumes:
- "./:/opt/test"

0 comments on commit 9a8a51f

Please sign in to comment.