Skip to content

Commit

Permalink
Add Docker support for development
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed May 31, 2021
1 parent d43c770 commit 5f1f747
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM php:7.2-cli-buster

RUN apt-get update && \
apt-get install -y autoconf pkg-config && \
pecl channel-update pecl.php.net && \
pecl install xdebug && \
pecl channel-update pecl.php.net && \
pecl install xdebug && \
docker-php-ext-enable opcache xdebug

RUN echo '\
Expand All @@ -16,10 +16,9 @@ RUN echo '\
date.timezone=UTC\n\
' >> /usr/local/etc/php/conf.d/php.ini

ENV PHP_IDE_CONFIG serverName=icanboogie-tests
ENV COMPOSER_ALLOW_SUPERUSER 1

RUN apt-get update && \
apt-get install unzip && \
curl -s https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet && \
mv composer.phar /usr/local/bin/composer
curl -s https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet && \
mv composer.phar /usr/local/bin/composer
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ version: "3.2"
services:
app:
build: .
environment:
PHP_IDE_CONFIG: 'serverName=icanboogie-events'
volumes:
- .:/app:delegated
- ~/.composer:/root/.composer
- ~/.composer:/root/.composer:delegated
working_dir: /app

0 comments on commit 5f1f747

Please sign in to comment.