mirror of
https://github.com/ivuorinen/docker-php-with-imagick-multi.git
synced 2026-03-20 11:02:19 +00:00
Compare commits
22 Commits
ee91a3f203
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ced5201b92 | ||
|
|
60490faa45 | ||
|
|
da03789da4 | ||
|
|
9f78b42ea7 | ||
|
|
2c4e3091ee | ||
|
|
4ac5f4822f | ||
|
|
4279d9fcce | ||
|
|
234abcddfb | ||
|
|
1d80e8708f | ||
| 5c23d3dcad | |||
| 92cb1405fa | |||
| 99d3e25d43 | |||
|
|
85bb129057 | ||
|
|
f724055fec | ||
|
|
c537df409f | ||
|
|
96c7e7b64f | ||
|
|
dd903ba508 | ||
|
|
1cf486fb40 | ||
|
|
8554d086d1 | ||
|
|
855eef393c | ||
|
|
65acd636ee | ||
|
|
95a7997904 |
11
.github/renovate.json
vendored
11
.github/renovate.json
vendored
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["github>ivuorinen/renovate-config"]
|
||||
"extends": ["github>ivuorinen/renovate-config"],
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "Only allow digest updates for PHP base images, not version upgrades",
|
||||
"matchDatasources": ["docker"],
|
||||
"matchPackageNames": ["php", "library/php"],
|
||||
"matchUpdateTypes": ["major", "minor", "patch"],
|
||||
"enabled": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
88
.github/workflows/docker-image.yml
vendored
88
.github/workflows/docker-image.yml
vendored
@@ -7,6 +7,9 @@ on:
|
||||
- cron: "0 2 * * 1" # At 2:00 on Monday.
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- "**/Dockerfile"
|
||||
- ".github/workflows/**"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
@@ -18,9 +21,8 @@ env:
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
BuildAndRelease:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
build:
|
||||
runs-on: ${{ matrix.arch == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
@@ -28,26 +30,90 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: [php74, php80, php81, php82, php83, php84]
|
||||
php: [php74, php80, php81, php82, php83, php84, php85]
|
||||
arch: ["linux/amd64", "linux/arm64"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
||||
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and Push (${{ matrix.php }} / ${{ matrix.arch }})
|
||||
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
||||
- name: Determine platform pair
|
||||
id: platform
|
||||
run: |
|
||||
echo "pair=$(echo '${{ matrix.arch }}' | tr '/' '-')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build and push by digest
|
||||
id: build
|
||||
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
|
||||
with:
|
||||
file: ${{ matrix.php }}/Dockerfile
|
||||
platforms: ${{ matrix.arch }}
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.php }}
|
||||
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
|
||||
cache-from: type=gha,scope=${{ matrix.php }}-${{ matrix.arch }}
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.php }}-${{ matrix.arch }}
|
||||
|
||||
- name: Export digest
|
||||
run: |
|
||||
mkdir -p /tmp/digests
|
||||
digest="${{ steps.build.outputs.digest }}"
|
||||
touch "/tmp/digests/${digest#sha256:}"
|
||||
|
||||
- name: Upload digest
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: digests-${{ matrix.php }}-${{ steps.platform.outputs.pair }}
|
||||
path: /tmp/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: [php74, php80, php81, php82, php83, php84, php85]
|
||||
|
||||
steps:
|
||||
- name: Download digests
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
path: /tmp/digests
|
||||
pattern: digests-${{ matrix.php }}-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create manifest list and push
|
||||
working-directory: /tmp/digests
|
||||
run: |
|
||||
# shellcheck disable=SC2046
|
||||
docker buildx imagetools create \
|
||||
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.php }} \
|
||||
$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
|
||||
|
||||
- name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect \
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.php }}
|
||||
|
||||
24
.github/workflows/pr-build.yml
vendored
24
.github/workflows/pr-build.yml
vendored
@@ -5,6 +5,9 @@ name: PR Build and Report
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- "**/Dockerfile"
|
||||
- ".github/workflows/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -21,7 +24,7 @@ permissions: read-all
|
||||
jobs:
|
||||
pr-build:
|
||||
name: PR Build
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.arch == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
|
||||
timeout-minutes: 30
|
||||
|
||||
permissions:
|
||||
@@ -33,11 +36,11 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: [php74, php80, php81, php82, php83, php84]
|
||||
php: [php74, php80, php81, php82, php83, php84, php85]
|
||||
arch: ["linux/amd64", "linux/arm64"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Set result filename
|
||||
id: resultfile
|
||||
@@ -49,10 +52,10 @@ jobs:
|
||||
echo "tag_arch=$TAG_ARCH" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
||||
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
@@ -60,7 +63,7 @@ jobs:
|
||||
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
||||
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.php }}
|
||||
tags: |
|
||||
@@ -69,7 +72,7 @@ jobs:
|
||||
- name: Extract base image
|
||||
id: baseimage
|
||||
run: |
|
||||
BASE_IMAGE="$(grep -m1 '^FROM ' ${{ env.DOCKERFILE_PATH }} | awk '{print $2}')"
|
||||
BASE_IMAGE="$(grep -m1 '^FROM ' ./${{ matrix.php }}/Dockerfile | awk '{print $2}')"
|
||||
echo "base_image=$BASE_IMAGE" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build Docker image (capture cache usage)
|
||||
@@ -82,6 +85,8 @@ jobs:
|
||||
docker buildx build \
|
||||
--platform ${{ matrix.arch }} \
|
||||
--tag "$IMAGE_TAG" \
|
||||
--cache-from type=gha,scope=${{ matrix.php }}-${{ matrix.arch }} \
|
||||
--cache-to type=gha,mode=max,scope=${{ matrix.php }}-${{ matrix.arch }} \
|
||||
--progress plain \
|
||||
--load ./${{ matrix.php }}/ | tee build.log
|
||||
END="$(date +%s)"
|
||||
@@ -130,7 +135,7 @@ jobs:
|
||||
mv ${{ steps.resultfile.outputs.filename }} results/
|
||||
|
||||
- name: Upload build result
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: build-results-${{ steps.resultfile.outputs.filename }}
|
||||
path: results/
|
||||
@@ -152,7 +157,7 @@ jobs:
|
||||
steps:
|
||||
- name: Download all build results
|
||||
id: dl
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
path: results
|
||||
|
||||
@@ -188,4 +193,3 @@ jobs:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body-file: comment.md
|
||||
|
||||
|
||||
14
.github/workflows/pr-lint.yml
vendored
14
.github/workflows/pr-lint.yml
vendored
@@ -5,8 +5,20 @@ name: Lint Code Base
|
||||
on:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths:
|
||||
- "**/Dockerfile"
|
||||
- ".github/workflows/**"
|
||||
- ".mega-linter.yml"
|
||||
- ".hadolint.yaml"
|
||||
- ".yamllint.yml"
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths:
|
||||
- "**/Dockerfile"
|
||||
- ".github/workflows/**"
|
||||
- ".mega-linter.yml"
|
||||
- ".hadolint.yaml"
|
||||
- ".yamllint.yml"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -29,4 +41,4 @@ jobs:
|
||||
steps:
|
||||
- name: Run PR Lint
|
||||
# https://github.com/ivuorinen/actions
|
||||
uses: ivuorinen/actions/pr-lint@cbfddb24339ba1e0129cc50ab5a0045131b8a2ba # v2026.01.13
|
||||
uses: ivuorinen/actions/pr-lint@1da3a0e79fcd7da6bed9ee1979f1449ba11f58f9 # v2026.03.14
|
||||
|
||||
13
.yamllint.yml
Normal file
13
.yamllint.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
extends: default
|
||||
rules:
|
||||
braces:
|
||||
max-spaces-inside: 1
|
||||
new-lines:
|
||||
level: warning
|
||||
type: unix
|
||||
line-length:
|
||||
max: 500
|
||||
comments:
|
||||
min-spaces-from-content: 1
|
||||
truthy: disable
|
||||
88
README.md
88
README.md
@@ -1,3 +1,89 @@
|
||||
# docker-php-with-imagick-multi
|
||||
|
||||
PHP 7.4-8.4 with imagick for arm64 and amd64
|
||||
[](https://github.com/ivuorinen/docker-php-with-imagick-multi/actions/workflows/docker-image.yml)
|
||||
[](https://github.com/ivuorinen/docker-php-with-imagick-multi)
|
||||
[](https://github.com/ivuorinen/docker-php-with-imagick-multi/commits/main)
|
||||
|
||||
Multi-architecture Docker images for PHP 7.4 through 8.5 with Imagick and Composer pre-installed.
|
||||
|
||||
## Available Images
|
||||
|
||||
| PHP Version | Tag | Pull Command |
|
||||
| ----------- | ------- | ------------------------------------------------------------------- |
|
||||
| PHP 7.4 | `php74` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php74` |
|
||||
| PHP 8.0 | `php80` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php80` |
|
||||
| PHP 8.1 | `php81` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php81` |
|
||||
| PHP 8.2 | `php82` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php82` |
|
||||
| PHP 8.3 | `php83` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php83` |
|
||||
| PHP 8.4 | `php84` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php84` |
|
||||
| PHP 8.5 | `php85` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php85` |
|
||||
|
||||
## Architectures
|
||||
|
||||
- `linux/amd64`
|
||||
- `linux/arm64`
|
||||
|
||||
## Included Software
|
||||
|
||||
### PHP Extensions
|
||||
|
||||
| Extension | Description |
|
||||
| ---------- | ---------------------------------- |
|
||||
| bcmath | Arbitrary precision mathematics |
|
||||
| intl | Internationalization (ICU) |
|
||||
| mbstring | Multibyte string handling |
|
||||
| pdo | PHP Data Objects database layer |
|
||||
| xml | XML parsing and manipulation |
|
||||
| gd | Image processing (freetype + jpeg) |
|
||||
| exif | Image metadata reading |
|
||||
| pcntl | Process control |
|
||||
| imagick | ImageMagick bindings (via PECL) |
|
||||
|
||||
### System Libraries
|
||||
|
||||
| Library | Purpose |
|
||||
| ------------------ | --------------------------- |
|
||||
| libicu-dev | ICU for intl extension |
|
||||
| libxml2-dev | XML parsing |
|
||||
| libfreetype6-dev | Font rendering (GD) |
|
||||
| libjpeg62-turbo-dev| JPEG support (GD) |
|
||||
| libpng-dev | PNG support (GD) |
|
||||
| libonig-dev | Oniguruma regex (mbstring) |
|
||||
| libmagickwand-dev | ImageMagick C API (imagick) |
|
||||
|
||||
### Tools
|
||||
|
||||
- **Composer** (latest, installed to `/usr/local/bin/composer`)
|
||||
|
||||
## Usage
|
||||
|
||||
Pull an image:
|
||||
|
||||
```sh
|
||||
docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php84
|
||||
```
|
||||
|
||||
Run a container:
|
||||
|
||||
```sh
|
||||
docker run --rm ghcr.io/ivuorinen/docker-php-with-imagick-multi:php84 php -v
|
||||
```
|
||||
|
||||
Use as a base image in your Dockerfile:
|
||||
|
||||
```dockerfile
|
||||
FROM ghcr.io/ivuorinen/docker-php-with-imagick-multi:php84
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN composer install --no-dev
|
||||
```
|
||||
|
||||
## Building Locally
|
||||
|
||||
```sh
|
||||
docker build -t my-php84 ./php84/
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
See [LICENSE](LICENSE) for details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
|
||||
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
|
||||
FROM php:7.4@sha256:620a6b9f4d4feef2210026172570465e9d0c1de79766418d3affd09190a7fda5
|
||||
|
||||
LABEL \
|
||||
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
|
||||
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
|
||||
FROM php:8.0@sha256:0569e384b9064c04dec55dc6e41be41b494a878dfbb6577a7d76bd50cfd5bc00
|
||||
|
||||
LABEL \
|
||||
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
|
||||
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
|
||||
FROM php:8.1@sha256:a57aba6a50bbb85fcd6fffaf45048c9f54a9cdec0e64d0cb5985d4d1a44e2634
|
||||
|
||||
LABEL \
|
||||
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
|
||||
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
|
||||
FROM php:8.2@sha256:ed4385b854a7ef4aeee1108c75333443d64c937faaf7c7d28bf63a436df06428
|
||||
|
||||
LABEL \
|
||||
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
|
||||
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
|
||||
FROM php:8.3@sha256:2643907fd60518306cfe9b68ac1e969065e55362b685b16b1c2b333af1e494ef
|
||||
|
||||
LABEL \
|
||||
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
|
||||
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
|
||||
FROM php:8.4@sha256:9eddbbdc9dc382a1e40d1d41ef5306ca00dbf088e3ba066f08717827d699592e
|
||||
|
||||
LABEL \
|
||||
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \
|
||||
|
||||
43
php85/Dockerfile
Normal file
43
php85/Dockerfile
Normal file
@@ -0,0 +1,43 @@
|
||||
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
|
||||
FROM php:8.5@sha256:2d7a7e055947c398314250fb6d657c85979872c44ce9912b9dc9d1456439b0b3
|
||||
|
||||
LABEL \
|
||||
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \
|
||||
version="1.0" \
|
||||
description="PHP 8.5 with Imagick and Composer"
|
||||
|
||||
# Install PHP extensions and required libraries
|
||||
RUN \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libicu-dev \
|
||||
libxml2-dev \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpng-dev \
|
||||
libonig-dev \
|
||||
libmagickwand-dev \
|
||||
unzip \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) \
|
||||
bcmath \
|
||||
intl \
|
||||
mbstring \
|
||||
pdo \
|
||||
xml \
|
||||
gd \
|
||||
exif \
|
||||
&& docker-php-ext-configure pcntl \
|
||||
&& docker-php-ext-install pcntl \
|
||||
&& yes '' | pecl install imagick \
|
||||
&& docker-php-ext-enable imagick \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -sS -o composer-setup.php https://getcomposer.org/installer \
|
||||
&& EXPECTED_HASH="$(curl -sS https://composer.github.io/installer.sig)" \
|
||||
&& ACTUAL_HASH="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" \
|
||||
&& if [ "$EXPECTED_HASH" != "$ACTUAL_HASH" ]; then echo 'Composer installer corrupt'; rm composer-setup.php; exit 1; fi \
|
||||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
|
||||
&& rm composer-setup.php \
|
||||
&& php --version \
|
||||
&& composer --version
|
||||
Reference in New Issue
Block a user