Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/php-8.0-jit' into php-8.0-jit
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbloise committed Nov 9, 2023
2 parents 7e0c647 + 5a43035 commit b938368
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docker Image CI

on:
push:
branches: [php-8.0-jit]
pull_request:
branches: [php-8.0-jit]

jobs:
build-push-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: docker-compose build --no-cache php
- run: docker image tag docker-multi-stage-php-nginx_php:latest ${{ secrets.DOCKER_USER }}/php:8.0-fpm-alpine-dev
- run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
- run: docker push ${{ secrets.DOCKER_USER }}/php:8.0-fpm-alpine-dev

build-push-prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: docker-compose -f docker-compose-cloud.yaml build --no-cache php
- run: docker image tag docker-multi-stage-php-nginx_php:latest ${{ secrets.DOCKER_USER }}/php:8.0-fpm-alpine-jit-prod
- run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
- run: docker push ${{ secrets.DOCKER_USER }}/php:8.0-fpm-alpine-jit-prod
15 changes: 7 additions & 8 deletions docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
FROM php:8.0.16-fpm-alpine AS base
FROM php:8.0-fpm-alpine AS base

LABEL maintainer="Matheus Bloise <[email protected]>"

WORKDIR /app

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-2.0.2 \
&& apk --update add --no-cache ${PHPIZE_DEPS} \
&& pecl install redis-5.3.4 \
&& docker-php-ext-enable redis
COPY --from=composer /usr/bin/composer /usr/bin/composer

RUN apk --update add --no-cache ${PHPIZE_DEPS} \
&& chmod +x /usr/local/bin/install-php-extensions \
&& rm -rf /var/cache/apk/*

FROM base AS development

ADD conf.d/dev.ini "$PHP_INI_DIR/conf.d/php.ini"

RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" \
&& pecl install xdebug-3.0.4 \
&& pecl install xdebug-3.1.4 \
&& docker-php-ext-enable xdebug


FROM base AS production

ADD conf.d/prod.ini "$PHP_INI_DIR/conf.d/php.ini"
Expand Down

0 comments on commit b938368

Please sign in to comment.