mirror of
https://github.com/ivuorinen/docker-php-with-imagick.git
synced 2026-02-24 09:52:30 +00:00
Added pipefail, linting, docs
This commit is contained in:
3
.github/workflows/docker-image.yml
vendored
3
.github/workflows/docker-image.yml
vendored
@@ -3,14 +3,13 @@ name: Docker Image CI
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '15 * 1,15 * *' # Runs only on default branch
|
- cron: "15 * 1,15 * *" # Runs only on default branch
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
9
.github/workflows/docker-publish.yml
vendored
9
.github/workflows/docker-publish.yml
vendored
@@ -7,11 +7,11 @@ name: GitHub Docker Registry Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '41 1 * * *'
|
- cron: "41 1 * * *"
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
# Publish semver tags as releases.
|
# Publish semver tags as releases.
|
||||||
tags: [ 'v*.*.*' ]
|
tags: ["v*.*.*"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
|
|
||||||
@@ -21,10 +21,8 @@ env:
|
|||||||
# github.repository as <account>/<repo>
|
# github.repository as <account>/<repo>
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -43,8 +41,7 @@ jobs:
|
|||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: sigstore/cosign-installer@main
|
uses: sigstore/cosign-installer@main
|
||||||
with:
|
with:
|
||||||
cosign-release: 'v1.13.1'
|
cosign-release: "v1.13.1"
|
||||||
|
|
||||||
|
|
||||||
# Workaround: https://github.com/docker/build-push-action/issues/461
|
# Workaround: https://github.com/docker/build-push-action/issues/461
|
||||||
- name: Setup Docker buildx
|
- name: Setup Docker buildx
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
FROM php:7.4
|
FROM php:7.4
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
RUN echo "" \
|
RUN echo "" \
|
||||||
&& docker-php-ext-install bcmath \
|
&& docker-php-ext-install bcmath \
|
||||||
&& docker-php-ext-configure pcntl \
|
&& docker-php-ext-configure pcntl \
|
||||||
@@ -12,8 +14,7 @@ RUN echo "" \
|
|||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
&& docker-php-ext-install -j$(nproc) intl mbstring pdo xml gd exif bcmath \
|
&& docker-php-ext-install -j$(nproc) intl mbstring pdo xml gd exif bcmath \
|
||||||
&& yes '' | pecl install imagick \
|
&& pecl install imagick && docker-php-ext-enable imagick \
|
||||||
&& docker-php-ext-enable imagick \
|
|
||||||
&& curl -sS https://getcomposer.org/installer \
|
&& curl -sS https://getcomposer.org/installer \
|
||||||
| php -- --install-dir=/usr/local/bin --filename=composer
|
| php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
RUN php --version \
|
RUN php --version \
|
||||||
|
|||||||
18
README.md
18
README.md
@@ -1,2 +1,20 @@
|
|||||||
# docker-php-with-imagick
|
# docker-php-with-imagick
|
||||||
|
|
||||||
PHP 7.4 with imagick for specific purposes
|
PHP 7.4 with imagick for specific purposes
|
||||||
|
|
||||||
|
## Building locally
|
||||||
|
|
||||||
|
### Setup docker buildx (run once)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --privileged --rm tonistiigi/binfmt --install all
|
||||||
|
docker buildx create --use
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build the image
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker buildx build --platform linux/amd64,linux/arm64 .
|
||||||
|
```
|
||||||
|
|
||||||
|
Example builds for both amd64 and arm64
|
||||||
|
|||||||
Reference in New Issue
Block a user