Skip to content

Versuche, die GD-Library zu installieren (Case 187461) #6

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ RUN apt-get update && apt-get install -y libzip4

FROM base as build_extensions

RUN apt-get update && apt-get install -y libzip-dev libicu-dev \
&& docker-php-ext-install gettext zip intl \
&& docker-php-ext-enable gettext zip intl
RUN apt-get update && apt-get install -y libzip-dev libicu-dev libfreetype-dev libjpeg62-turbo-dev libpng-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gettext zip intl gd \
&& docker-php-ext-enable gettext zip intl gd

FROM composer:2 as staging

Expand All @@ -20,6 +21,10 @@ RUN git checkout $VERSION \

FROM base

ARG ARCH
COPY --from=build_extensions /usr/lib/${ARCH}-linux-gnu/libjpeg* /usr/lib/${ARCH}-linux-gnu/
COPY --from=build_extensions /usr/lib/${ARCH}-linux-gnu/libpng* /usr/lib/${ARCH}-linux-gnu/
COPY --from=build_extensions /usr/lib/${ARCH}-linux-gnu/libfreetype* /usr/lib/${ARCH}-linux-gnu/
COPY --from=build_extensions /usr/local/lib/php /usr/local/lib/php
COPY --from=build_extensions /usr/local/etc/php /usr/local/etc/php
COPY --from=staging /composer-require-checker /composer-require-checker
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Review and/or tweak the `Dockerfile` if necessary.

Run
```bash
docker build --build-arg VERSION=4.5.0 --tag composer-require-checker .
docker build --build-arg VERSION=4.5.0 --tag composer-require-checker --build-arg ARCH=$(uname -m) .
```

and be sure to set the build argument `VERSION` to a [valid version number](https://github.com/maglnet/ComposerRequireChecker/tags).
Expand Down