This commit is contained in:
Refactorian
2023-04-18 21:50:45 +09:00
committed by GitHub
parent 5f29134636
commit 4fe93734e4
91 changed files with 11957 additions and 1 deletions

21
.docker/php/.bashrc Normal file
View File

@@ -0,0 +1,21 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
export SHELL
export LS_OPTIONS='--color=auto'
eval $(dircolors ~/dircolors-solarized/dircolors.256dark)
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias phpd='php -dzend_extension=xdebug.so -dxdebug.mode=debug -dxdebug.idekey=PHPSTORM -dxdebug.start_with_request=yes -dxdebug.client_host=host.docker.internal -dxdebug.client_port=9001'

45
.docker/php/Dockerfile Normal file
View File

@@ -0,0 +1,45 @@
FROM php:8.2-fpm
COPY php.ini /usr/local/etc/php/
COPY docker.conf /usr/local/etc/php-fpm.d/docker.conf
COPY .bashrc /root/
RUN apt-get update \
&& apt-get install -y build-essential zlib1g-dev default-mysql-client curl gnupg procps vim git unzip libzip-dev libpq-dev \
&& docker-php-ext-install zip pdo_mysql pdo_pgsql pgsql
RUN apt-get install -y libicu-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl
# pcov
RUN pecl install pcov && docker-php-ext-enable pcov
# Xdebug
#RUN pecl install xdebug \
# && docker-php-ext-enable xdebug \
# && echo ";zend_extension=xdebug" > /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN curl -sL https://deb.nodesource.com/setup_19.x | bash -
RUN apt-get install -y nodejs
RUN npm install npm@latest -g
RUN npm install yarn -g
#RUN npm install -g @vue/cli
WORKDIR /root
RUN git clone https://github.com/seebi/dircolors-solarized
# Composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/local/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_HOME /composer
ENV PATH $PATH:/composer/vendor/bin
EXPOSE 5173
WORKDIR /var/www
RUN composer global require "laravel/installer"

12
.docker/php/docker.conf Normal file
View File

@@ -0,0 +1,12 @@
[global]
error_log = /proc/self/fd/2
;request_terminate_timeout = 1h
[www]
; if we send this to /proc/self/fd/1, it never appears
access.log = /proc/self/fd/1
clear_env = no
; Ensure worker stdout and stderr are sent to the main error log.
catch_workers_output = yes

7
.docker/php/php.ini Normal file
View File

@@ -0,0 +1,7 @@
; Example
[Date]
date.timezone = "Asia/Tokyo"
[mbstring]
mbstring.language = Japanese