Skip to content

Commit

Permalink
app image added.
Browse files Browse the repository at this point in the history
  • Loading branch information
arifulhb committed May 16, 2021
1 parent a05ae4c commit b3960c9
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
./idea/
app/
.idea/
app/*
3 changes: 3 additions & 0 deletions docker/data/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
*/
!.gitignore
56 changes: 56 additions & 0 deletions docker/images/app/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
FROM php:7.3.24-fpm-alpine3.12

COPY ./docker/config/php/php-ini-development.ini /usr/local/etc/php/conf.d/php.ini

# Work Directory
WORKDIR /var/www/app

# Install Nodejs
RUN apk update \
&& apk add --no-cache --virtual buildDeps autoconf nodejs \
&& apk del buildDeps

# Install packages
RUN apk update && apk add --no-cache --virtual buildDeps autoconf \
wget \
curl \
bash \
redis \
mysql-client \
imagemagick \
libmcrypt-dev build-base gnupg \
bash alpine-sdk \
&& apk del buildDeps

# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=1.10.17

RUN apk update && apk add --no-cache --virtual buildDeps autoconf \
&& docker-php-ext-install \
pcntl \
exif \
mysqli \
pdo_mysql \
opcache \
&& apk del buildDeps

# https://github.com/mlocati/docker-php-extension-installer
ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/

RUN chmod +x /usr/local/bin/install-php-extensions \
&& sync \
&& install-php-extensions \
gd intl zip bz2 calendar gmagick \
memcache memcached redis \
bcmath gmp uuid \
mongodb pcov \
uopz soap \
xdebug

# Add user for laravel application
RUN addgroup -S www && adduser -S -G www www \
&& chown -R www-data:www-data /var/www/app \
&& chmod -R 755 /var/www/app

# Change current user to www
USER www

0 comments on commit b3960c9

Please sign in to comment.