An open API service indexing awesome lists of open source software.

https://github.com/naoigcat/docker-imagemagick

Docker Image for ImageMagick
https://github.com/naoigcat/docker-imagemagick

docker docker-image dockerfile dockerhub imagemagick

Last synced: about 1 month ago
JSON representation

Docker Image for ImageMagick

Awesome Lists containing this project

README

          

# Docker ImageMagick

[![Docker Builds](https://github.com/naoigcat/docker-imagemagick/actions/workflows/push.yml/badge.svg)](https://github.com/naoigcat/docker-imagemagick/actions/workflows/push.yml)

[![GitHub Stars](https://img.shields.io/github/stars/naoigcat/docker-imagemagick.svg)](https://github.com/naoigcat/docker-imagemagick/stargazers)
[![Docker Pulls](https://img.shields.io/docker/pulls/naoigcat/imagemagick)](https://hub.docker.com/r/naoigcat/imagemagick)

**Docker Image for [ImageMagick](https://imagemagick.org/index.php)**

## Installation

```sh
docker pull naoigcat/imagemagick
```

## Security

- The image runs as an unprivileged user by default.
- The Debian base image is pinned by digest to reduce supply-chain drift.
- ImageMagick remote URL delegates and indirect file reads are disabled in the bundled policy.
- CI publishes SBOM and provenance attestations and runs scheduled vulnerability scans.

## Usage

See [imagemagick](https://imagemagick.org/index.php) for available commands.

```sh
docker run --rm -v "$PWD":/app naoigcat/imagemagick identify image.png
```

It is recommended to create an alias:

```sh
alias imagemagick='docker run --rm -v "$PWD":/app naoigcat/imagemagick'
```

If you need files in the mounted directory to be owned by the host user, override the container user explicitly.

```sh
docker run --rm --user "$(id -u)":"$(id -g)" -v "$PWD":/app naoigcat/imagemagick identify image.png
```

## Using in GitHub Actions

You can use this Docker image in your GitHub Actions workflows to process images during CI/CD.

### Basic Example

```yaml
name: Process Image

on: [push]

jobs:
generate:
runs-on: ubuntu-latest
container:
image: naoigcat/imagemagick:latest
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Create sample image
run: magick -size 200x100 xc:white -gravity center -pointsize 24 -annotate 0 'Sample' output.jpg

- name: Upload sample image
uses: actions/upload-artifact@v4
with:
name: image
path: output.jpg
```

### Using with docker run

Alternatively, you can use the image with `docker run` in your workflow:

```yaml
name: Process Image

on: [push]

jobs:
process:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Create sample image
run: |
docker run --rm --user "$(id -u)":"$(id -g)" -v "$PWD":/app naoigcat/imagemagick \
magick -size 200x100 xc:white -gravity center -pointsize 24 -annotate 0 'Sample' output.jpg

- name: Upload sample image
uses: actions/upload-artifact@v4
with:
name: image
path: output.jpg
```