-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (39 loc) · 1.46 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM php:8.2-alpine
LABEL maintainer="Ezra Lazuardy <[email protected]>"
LABEL org.opencontainers.image.description "A battery-included CI/CD Environment for Laravel."
ARG WWWGROUP=1000
ARG WWWUSER=1000
ARG NODE_VERSION=18
ARG POSTGRES_VERSION=15
WORKDIR /var/www/html
ENV TZ=UTC
RUN echo $TZ > /etc/timezone
RUN apk add bash zip unzip curl sqlite supervisor git nodejs npm
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
RUN sed -i 's/bin\/ash/bin\/bash/g' /etc/passwd
RUN install-php-extensions \
mysqli pdo_mysql pdo_pgsql \
sqlite3 fileinfo xml \
gd imagick curl \
imap exif mbstring \
xml zip bcmath \
soap intl readline \
ldap msgpack igbinary \
redis swoole opcache \
memcached redis pcov \
zip json pcntl
RUN ln -s /usr/bin/php82 /usr/bin/php
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer
RUN rm -rf composer-setup.php
RUN mkdir -p /etc/supervisor.d/
COPY ./config/supervisord.ini /etc/supervisor.d/supervisord.ini
RUN mkdir -p /run/php/
RUN touch /run/php/php8.2-fpm.pid
COPY ./config/php-fpm.conf /etc/php82/php-fpm.conf
COPY ./config/php.ini /etc/php82/php.ini
COPY ./config/start-container /usr/local/bin/start-container
RUN chmod +x /usr/local/bin/start-container
EXPOSE 8000
CMD ["start-container"]