Skip to content

Commit

Permalink
add php8.3-alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
ariaieboy committed Oct 19, 2023
1 parent 1064764 commit b8bfadf
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.0','8.1','8.2']
php: ['8.0','8.1','8.2','8.3']
node: ['18','20']
exclude:
- php: '8.3'
node: '18'
steps:
-
name: Checkout
Expand Down
44 changes: 44 additions & 0 deletions runtimes/8.3/DockerfileAlpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
ARG NODE_VERSION
ARG POSTGRES_VERSION=16

FROM node:${NODE_VERSION}-alpine AS node

FROM php:8.3.0RC4-cli-alpine

LABEL maintainer="AriaieBOY"

WORKDIR /var/www/html
ENV TZ=UTC

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

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 @composer pgsql pcov xdebug gd imap zip bcmath pcntl soap intl exif imagick ldap msgpack igbinary redis swoole opcache memcached pdo_pgsql pdo_mysql xhprof

COPY --from=node /usr/lib /usr/lib
COPY --from=node /usr/local/lib /usr/local/lib
COPY --from=node /usr/local/include /usr/local/include
COPY --from=node /usr/local/bin /usr/local/bin

RUN npm install -g npm \
&& npm install -g pnpm svgo \
&& apk add --update supervisor jpegoptim optipng pngquant gifsicle libpng-dev && rm -rf /tmp/* /var/cache/apk/*
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/main \
postgresql${POSTGRES_VERSION}-client

RUN adduser -D sail

RUN ln -s /usr/local/bin/php /usr/bin/php
COPY start-container-alpine /usr/local/bin/start-container
COPY cli.conf /etc/supervisor/conf.d/cli.conf
COPY octane.conf /etc/supervisor/conf.d/octane.conf
COPY octane-watch.conf /etc/supervisor/conf.d/octane-watch.conf
COPY php.ini "$PHP_INI_DIR/php.ini"
RUN mkdir -p /var/log/supervisor
RUN chmod +x /usr/local/bin/start-container

EXPOSE 8000

ENTRYPOINT ["start-container"]

0 comments on commit b8bfadf

Please sign in to comment.