Skip to content

Instantly share code, notes, and snippets.

@Mezzle
Last active November 6, 2018 15:41
Show Gist options
  • Save Mezzle/f1a33e4796cce15d881e1111d16b4e03 to your computer and use it in GitHub Desktop.
Save Mezzle/f1a33e4796cce15d881e1111d16b4e03 to your computer and use it in GitHub Desktop.
Basic Docker setup for Magento
version: '3'
services:
web:
build: .
volumes:
- .:/var/www/html
ports:
- 8181:80
db:
image: mariadb
ports:
- 13306:3306
environment:
MYSQL_ROOT_PASSWORD: password
FROM php:7.1-apache
RUN apt-get update -y && apt-get install -y libmcrypt-dev libxslt-dev \
zlib1g-dev libjpeg-dev libpng-dev libfreetype6-dev \
&& docker-php-ext-install -j$(nproc) mcrypt \
&& docker-php-ext-install -j$(nproc) xsl \
&& docker-php-ext-install -j$(nproc) intl \
&& docker-php-ext-install -j$(nproc) pdo_mysql \
&& docker-php-ext-install -j$(nproc) soap \
&& docker-php-ext-install -j$(nproc) zip \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
RUN a2enmod rewrite
COPY . /var/www/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment