Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
cakephpを雑に動かす時の私のdockerメモ
version: '3'
services:
hogehoge-cakephp3:
container_name: hogehoge-cakephp3
build: .
volumes:
- ..:/var/www/html:cached
tty: true
expose:
- "9000"
FROM php:7.1
RUN apt-get update && apt-get install -y --no-install-recommends \
libicu-dev \
wget \
vim \
git \
zsh \
lv \
zip \
unzip \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/php/ext
RUN git clone https://github.com/xdebug/xdebug
RUN docker-php-ext-install intl xdebug
RUN echo 'xdebug.remote_enable = On' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo 'xdebug.remote_autostart = On' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo 'xdebug.remote_port = 9000' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo 'xdebug.idekey = PHPSTORM' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo 'xdebug.remote_connect_back = 1' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
WORKDIR /var/www/html
RUN wget http://getcomposer.org/composer.phar && \
mv composer.phar /usr/bin/composer && \
chmod 0755 /usr/bin/composer && \
composer config -g repos.packagist composer https://packagist.jp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment