Skip to content

Commit

Permalink
Add docker configs
Browse files Browse the repository at this point in the history
  • Loading branch information
dena-a committed Mar 6, 2024
1 parent 08219c8 commit 52e4ba6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.idea
/.vscode
/*.code-workspace

.git
.github
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/vendor
/.idea
.phpunit.result.cache
composer.lock
composer.lock

/.idea
/.vscode
/*.code-workspace
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.7'

services:
app:
build:
context: .
dockerfile: ./docker/Dockerfile
working_dir: /app
volumes:
- .:/app/

27 changes: 27 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ARG PHP_VERSION=8.2

FROM php:${PHP_VERSION}-cli

# Install extensions
RUN apt-get update && \
apt-get install -y \
autoconf \
pkg-config \
libssl-dev \
git \
unzip \
libzip-dev \
libxml2-dev \
zlib1g-dev && \
pecl install xdebug && docker-php-ext-enable xdebug && \
docker-php-ext-install -j$(nproc) zip

# Install extensions
RUN docker-php-ext-install xml zip soap && \
docker-php-ext-enable xml zip soap

# Create php.ini
RUN cp "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"

# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

0 comments on commit 52e4ba6

Please sign in to comment.