Skip to content

Commit

Permalink
Update docker files, upgrade php to 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejkosiarski committed Oct 9, 2020
1 parent 18193b0 commit 87f8800
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 127 deletions.
37 changes: 37 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM php:7.4.0-fpm

ARG DEV_USER_UID=1000

RUN apt-get update && apt-get install -y zsh vim figlet git nano && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && \
cp phpcs.phar /usr/local/bin/phpcs && \
chmod +x /usr/local/bin/phpcs && \
curl -OL https://cs.symfony.com/download/php-cs-fixer-v2.phar && \
cp php-cs-fixer-v2.phar /usr/local/bin/phpcsfixer && \
chmod +x /usr/local/bin/phpcsfixer && \
curl -OL https://github.com/phpmd/phpmd/releases/download/2.7.0/phpmd.phar && \
cp phpmd.phar /usr/local/bin/phpmd && \
chmod +x /usr/local/bin/phpmd && \
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar && \
cp phpcbf.phar /usr/local/bin/phpcbf && \
chmod +x /usr/local/bin/phpcbf && \
phpcs --config-set default_standard PSR2 && \
phpcs --config-set report_format summary && \
phpcs --config-set show_progress 1 && \
phpcs --config-set colors 1 && \
pecl install xdebug && \
docker-php-ext-enable xdebug && \
cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini && \
rm -rf /var/lib/apt/lists/* && \
pecl clear-cache && \
pecl config-set php_ini /usr/local/etc/php/conf.d/over.ini

RUN useradd -m -s /bin/bash developer

RUN echo "su - developer" > /root/.bashrc
#USER developer
#RUN bash -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" "" --unattended
#RUN curl -o ~/.zshrc https://raw.githubusercontent.com/adrianmalec/my-elementary-os/master/universal-zshrc

WORKDIR "/application"
10 changes: 10 additions & 0 deletions .docker/config/php-ini-overrides.ini.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
memory_limit = -1
upload_max_filesize = 100M
post_max_size = 108M

xdebug.remote_enable = true
xdebug.remote_host = DOCKER_GATEWAY
xdebug.remote_port = 9001
xdebug.idekey = PHPSTORM
xdebug.remote_autostart = true
xdebug.remote_connect_back = true
21 changes: 21 additions & 0 deletions .docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
###############################################################################
# JWT Keeper #
###############################################################################
version: "3.7"
services:
jwtkeeper-php-fpm:
build: .
container_name: jwtkeeper-php-fpm
restart: on-failure
user: developer
tty: true
volumes:
- ~/.ssh:/home/developer/.ssh
- ../:/application
- ./config/php-ini-overrides.ini.dist:/usr/local/etc/php/conf.d/99-overrides.ini
networks:
jwtkeeper:
aliases:
- core
networks:
jwtkeeper:
89 changes: 0 additions & 89 deletions Dockerfile

This file was deleted.

38 changes: 0 additions & 38 deletions docker-compose.yml

This file was deleted.

0 comments on commit 87f8800

Please sign in to comment.