-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile-pgsql-Laravel9-10.txt
43 lines (28 loc) · 1.23 KB
/
Dockerfile-pgsql-Laravel9-10.txt
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
36
37
38
39
40
41
42
43
FROM php:8.1.9-fpm-alpine
# Updates opcionales
#RUN apk update
#RUN apk upgrade
RUN apk --no-cache upgrade && \
apk --no-cache add bash git sudo openssh libxml2-dev oniguruma-dev autoconf gcc g++ make npm freetype-dev libjpeg-turbo-dev libpng-dev libzip-dev libssh2-dev postgresql-dev
# PHP: Install php extensions
RUN pecl channel-update pecl.php.net
RUN pecl install pcov ssh2 swoole
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install mbstring xml pcntl gd zip sockets pgsql pdo pdo_pgsql bcmath soap
RUN docker-php-ext-enable mbstring xml gd zip pcov pcntl sockets bcmath pdo pdo_pgsql pgsql soap swoole
RUN docker-php-ext-install pdo pdo_mysql sockets
RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin --filename=composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
COPY --from=spiralscout/roadrunner:2.4.2 /usr/bin/rr /usr/bin/rr
WORKDIR /app
COPY . .
RUN composer install
RUN composer require laravel/octane spiral/roadrunner
RUN npm install --global yarn
RUN yarn
RUN yarn prod
RUN php artisan key:generate
RUN php artisan octane:install --server="swoole"
CMD php artisan octane:start --server="swoole" --host="0.0.0.0"
EXPOSE 8000