Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mrinjamul committed Jun 3, 2021
1 parent b1e8243 commit d9720c5
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM php:7.3.28-apache

LABEL maintainer="Injamul Mohammad Mollah <mrinjamul@gmail.com>"

RUN apt-get update -y && apt-get install -y \
libwebp-dev \
libjpeg62-turbo-dev \
libxpm-dev \
libfreetype6-dev \
libpng-dev \
&& rm -rf /var/lib/apt/lists/*

RUN docker-php-ext-install pdo pdo_mysql

RUN docker-php-ext-install mbstring fileinfo gettext exif

RUN docker-php-ext-configure gd --with-gd --with-webp-dir --with-jpeg-dir \
--with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir

RUN docker-php-ext-install gd

RUN a2enmod rewrite
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# php-devel
# PHP Development Environment

This image is created for the containerized development purpose of PHP.

## How to use?

cd into your PHP project root directory. then run the following command.

```shell
docker run --rm -d -p 8080:80 --name my_awesome_app -v "$PWD":/var/www/html mrinjamul/php-devel:7.3.28
```

Now go to [http://localhost:8080](http://localhost:8080) . You can see the website is up.

## Author

- Injamul Mohammad Mollah <mrinjamul@gmail.com>

## License

- licensed under [MIT](https://github.com/mrinjamul/php-devel/blob/main/LICENSE)

0 comments on commit d9720c5

Please sign in to comment.