Skip to content

Commit

Permalink
build-args を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed Sep 16, 2023
1 parent c654b70 commit b134893
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 11 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/dockerbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,22 @@ jobs:
run: |
echo "GD_OPTIONS=--with-freetype-dir=/usr/include --with-jpeg-dir=/usr/include" >> ${GITHUB_ENV}
echo "EXT_INSTALL_ARGS=gd zip mysqli pgsql mbstring" >> ${GITHUB_ENV}
echo "APCU=apcu-4.0.11" >> ${GITHUB_ENV}
echo "FORCE_YES=--force-yes" >> ${GITHUB_ENV}
echo "APCU=apcu-4.0.11" >> ${GITHUB_ENV}
echo "FORCE_YES=--force-yes" >> ${GITHUB_ENV}
echo "APT_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
echo "APT_SECURITY_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
- if: ${{ matrix.php == 5.5 || matrix.php == 5.6 }}
run: |
echo "GD_OPTIONS=--with-freetype-dir=/usr/include --with-jpeg-dir=/usr/include" >> ${GITHUB_ENV}
echo "EXT_INSTALL_ARGS=gd zip mysqli pgsql opcache" >> ${GITHUB_ENV}
echo "APCU=apcu-4.0.11" >> ${GITHUB_ENV}
echo "APCU=" >> ${GITHUB_ENV}
echo "FORCE_YES=--force-yes" >> ${GITHUB_ENV}
echo "APT_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
echo "APT_SECURITY_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
- if: ${{ matrix.php == 7.0 }}
run: |
echo "APT_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
echo "APT_SECURITY_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
- if: ${{ matrix.php >= 7.0 && matrix.php <= 7.3 }}
run: |
echo "GD_OPTIONS=--with-freetype-dir=/usr/include --with-jpeg-dir=/usr/include" >> ${GITHUB_ENV}
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,34 @@ jobs:
run: |
echo "GD_OPTIONS=--with-freetype-dir=/usr/include --with-jpeg-dir=/usr/include" >> ${GITHUB_ENV}
echo "EXT_INSTALL_ARGS=gd zip mysqli pgsql mbstring" >> ${GITHUB_ENV}
echo "APCU=apcu-4.0.11" >> ${GITHUB_ENV}
echo "APCU=apcu-4.0.11" >> ${GITHUB_ENV}
echo "FORCE_YES=--force-yes" >> ${GITHUB_ENV}
echo "APT_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
echo "APT_SECURITY_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
- if: ${{ matrix.php == 5.5 || matrix.php == 5.6 }}
run: |
echo "GD_OPTIONS=--with-freetype-dir=/usr/include --with-jpeg-dir=/usr/include" >> ${GITHUB_ENV}
echo "EXT_INSTALL_ARGS=gd zip mysqli pgsql opcache" >> ${GITHUB_ENV}
echo "APCU=apcu-4.0.11" >> ${GITHUB_ENV}
echo "APCU=" >> ${GITHUB_ENV}
echo "FORCE_YES=--force-yes" >> ${GITHUB_ENV}
echo "APT_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
echo "APT_SECURITY_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
- if: ${{ matrix.php == 7.0 }}
run: |
echo "APT_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
echo "APT_SECURITY_REPO=cloudfront.debian.net/debian-archive" >> ${GITHUB_ENV}
- if: ${{ matrix.php >= 7.0 && matrix.php <= 7.3 }}
run: |
echo "GD_OPTIONS=--with-freetype-dir=/usr/include --with-jpeg-dir=/usr/include" >> ${GITHUB_ENV}
echo "EXT_INSTALL_ARGS=gd zip mysqli pgsql opcache" >> ${GITHUB_ENV}
echo "APCU=apcu" >> ${GITHUB_ENV}
echo "FORCE_YES=" >> ${GITHUB_ENV}
- if: ${{ matrix.php >= 7.4 }}
run: |
echo "GD_OPTIONS=--with-freetype --with-jpeg" >> ${GITHUB_ENV}
echo "EXT_INSTALL_ARGS=gd zip mysqli pgsql opcache" >> ${GITHUB_ENV}
echo "APCU=apcu" >> ${GITHUB_ENV}
echo "FORCE_YES=" >> ${GITHUB_ENV}
- name: Checkout
uses: actions/checkout@v3
Expand Down
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ FROM php:${TAG}
ARG GD_OPTIONS="--with-freetype --with-jpeg"
ARG EXT_INSTALL_ARGS="gd zip mysqli pgsql opcache"
ARG APCU="apcu"
ARG FORCE_YES="--force-yes"
ARG FORCE_YES=""
ARG APT_REPO="deb.debian.org"
ARG APT_SECURITY_REPO="security.debian.org"

# See https://github.com/debuerreotype/debuerreotype/issues/10
RUN if [ ! -d /usr/share/man/man1 ]; then mkdir /usr/share/man/man1; fi
RUN if [ ! -d /usr/share/man/man7 ]; then mkdir /usr/share/man/man7; fi

RUN sed -i s,deb.debian.org,cloudfront.debian.net/debian-archive,g /etc/apt/sources.list
RUN sed -i 's,security.debian.org,cloudfront.debian.net/debian-archive,g' /etc/apt/sources.list
RUN sed -i '/stretch-updates/d' /etc/apt/sources.list
RUN sed -i s,deb.debian.org,${APT_REPO},g /etc/apt/sources.list;
RUN sed -i s,security.debian.org,${APT_SECURITY_REPO},g /etc/apt/sources.list;
RUN sed -i s,httpredir.debian.org,${APT_REPO},g /etc/apt/sources.list; # for jessie
RUN sed -i '/stretch-updates/d' /etc/apt/sources.list # for stretch
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list # for jessie

# ext-gd: libfreetype6-dev libjpeg62-turbo-dev libpng-dev
# ext-pgsql: libpq-dev
Expand All @@ -31,7 +36,7 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

RUN docker-php-ext-configure gd ${GD_OPTIONS} && docker-php-ext-install ${EXT_INSTALL_ARGS}
RUN pecl install ${APCU} && docker-php-ext-enable apcu
RUN if [[ ${APCU} ]]; then pecl install ${APCU} && docker-php-ext-enable apcu; fi

# composer
COPY --from=composer:2.2 /usr/bin/composer /usr/bin/composer
Expand Down Expand Up @@ -68,4 +73,4 @@ COPY composer.lock ${ECCUBE_PREFIX}/composer.lock
RUN composer install --no-scripts --no-autoloader --no-dev -d ${ECCUBE_PREFIX}

COPY . ${ECCUBE_PREFIX}
RUN composer dumpautoload -o --apcu
RUN composer dumpautoload -o

0 comments on commit b134893

Please sign in to comment.