-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathDockerfile
31 lines (23 loc) · 1.19 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
FROM php:8.1-alpine
RUN apk add --no-cache git jq moreutils
RUN apk add --no-cache $PHPIZE_DEPS postgresql-dev \
&& docker-php-ext-install pdo_pgsql \
&& pecl install xdebug-3.1.5 \
&& docker-php-ext-enable xdebug \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host = 172.19.0.1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer create-project --prefer-dist laravel/laravel example && \
cd example
WORKDIR /example
COPY . /laravel-scim-server
RUN jq '.repositories=[{"type": "path","url": "/laravel-scim-server"}]' ./composer.json | sponge ./composer.json
RUN composer require arietimmerman/laravel-scim-server @dev && \
composer require laravel/tinker
RUN touch ./.database.sqlite && \
echo "DB_CONNECTION=sqlite" >> ./.env && \
echo "DB_DATABASE=/example/.database.sqlite" >> ./.env && \
echo "APP_URL=http://localhost:18123" >> ./.env
RUN php artisan migrate && \
echo "User::factory()->count(100)->create();" | php artisan tinker
CMD php artisan serve --host=0.0.0.0 --port=8000