Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure composer is allowed to run as root in the builder step #276

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test build Docker image

on:
pull_request:
schedule:
# Run every day at 10:45 AM UTC to discover potential issues with dependencies like PHP updates etc.
- cron: '45 10 * * *'

jobs:
build-image:
runs-on: ubuntu-latest
strategy:
matrix:
image_type: [apache, fpm]
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
file: ${{ matrix.image_type }}/Dockerfile
context: .
tags: ${{ matrix.image_type }}-test
2 changes: 1 addition & 1 deletion apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ RUN echo "memory_limit = -1" > /usr/local/etc/php/php.ini
ARG MAUTIC_VERSION=5.x-dev

RUN cd /opt && \
COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \
COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \
rm -rf /opt/mautic/var/cache/js && \
find /opt/mautic/node_modules -mindepth 1 -maxdepth 1 -not \( -name 'jquery' -or -name 'vimeo-froogaloop2' \) | xargs rm -rf

Expand Down
2 changes: 1 addition & 1 deletion fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ RUN echo "memory_limit = -1" > /usr/local/etc/php/php.ini
ARG MAUTIC_VERSION=5.x-dev

RUN cd /opt && \
COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \
COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \
rm -rf /opt/mautic/var/cache/js && \
find /opt/mautic/node_modules -mindepth 1 -maxdepth 1 -not \( -name 'jquery' -or -name 'vimeo-froogaloop2' \) | xargs rm -rf

Expand Down