-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72ae8ce
commit b7cd3e2
Showing
2 changed files
with
17 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,17 @@ | ||
# based on https://github.com/laravel/sail/blob/1.x/runtimes/8.2/Dockerfile | ||
FROM mcr.microsoft.com/appsvc/php:8.2-fpm-xdebug_20230908.3.tuxprod | ||
|
||
FROM ubuntu:22.04 | ||
|
||
WORKDIR /var/www/html | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV TZ=UTC | ||
|
||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update \ | ||
&& mkdir -p /etc/apt/keyrings \ | ||
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch ffmpeg nano \ | ||
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \ | ||
&& echo "deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y php8.2-cli php8.2-dev \ | ||
php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick \ | ||
php8.2-curl \ | ||
php8.2-imap php8.2-mysql php8.2-mbstring \ | ||
php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap \ | ||
php8.2-intl php8.2-readline \ | ||
php8.2-ldap \ | ||
php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole \ | ||
php8.2-memcached php8.2-pcov php8.2-xdebug \ | ||
&& apt-get install -y postgresql-client \ | ||
&& apt-get -y autoremove \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
CMD /usr/bin/php /var/www/html/artisan serve --host=0.0.0.0 --port=8001 | ||
# once we upgrade to buildkit we can use heredocs: https://www.docker.com/blog/introduction-to-heredocs-in-dockerfiles/ | ||
RUN printf ' \n\ | ||
server { \n\ | ||
listen 8001; \n\ | ||
root /home/site/wwwroot; \n\ | ||
index index.php \n\ | ||
server_name localhost; \n\ | ||
port_in_redirect off; \n\ | ||
\n\ | ||
location ~* { \n\ | ||
fastcgi_pass 127.0.0.1:9000; \n\ | ||
include fastcgi_params; \n\ | ||
fastcgi_param SCRIPT_FILENAME $document_root/public/index.php; \n\ | ||
} \n\ | ||
} ' > /etc/nginx/sites-available/default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters