Skip to content

Instantly share code, notes, and snippets.

@o0h
Last active October 18, 2017 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save o0h/69b79dea16a3c37b180082ac6dac89a4 to your computer and use it in GitHub Desktop.
Save o0h/69b79dea16a3c37b180082ac6dac89a4 to your computer and use it in GitHub Desktop.
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