-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (23 loc) · 1.09 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM php:8.1.1-apache
COPY eshop/ /var/www/html/
#installs php composer
RUN apt update
RUN echo 'Y' | apt install wget unzip
RUN cd ~
RUN curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
RUN HASH=`curl -sS https://composer.github.io/installer.sig`
RUN php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
RUN php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
#installs pdo and pdo_mysql drivers for php
# RUN apt-get update && apt-get upgrade -y
# RUN apt-get update && \
# apt-get install -y \
# libzip-dev \
# libjpeg62-turbo-dev \
# libpng-dev
# RUN docker-php-ext-install pdo pdo_mysql gd
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions pdo pdo_mysql gd xdebug
#runs laravel server
CMD php /var/www/html/artisan serve --host=0.0.0.0 --port=8000