HUB
Sign inSign up

aljazmc/inkscape-alpine

By aljazmc

•Updated 2 days ago

Inkscape 1.4.2 with every Python extension and the import/export helpers

Image
Integration & delivery
Developer tools
0

615

aljazmc/inkscape-alpine repository overview

⁠aljazmc/inkscape-alpine

Inkscape with its Python extensions and import and export helpers on Alpine Linux, for converting and exporting drawings from the command line.

Docker pulls Image size Version platforms: amd64 | arm64 Alpine: 3.24.4 Inkscape: 1.4.2 Inkscape license: GPL-2.0-or-later CI Dockerfile license: MIT

Docker Hub⁠ · Source⁠ · All images⁠

⁠Overview

Base imagealpine:3.24.4
SoftwareInkscape 1.4.2 (Alpine package)
Also includedPython 3 extension modules, ImageMagick, Ghostscript, fig2dev, rsvg-convert, libwmf, aspell, Ruby, xterm, ShellCheck, Ruff 0.17.6 (pip)
Userinkscape (uid 1000) with passwordless doas (doas apk add ...)
Tagslatest, 1.4.2, 1.4.2-YYYYMMDD

⁠Quick start

Run in an empty directory; the commands work on the files of the current directory, mounted as the home directory of the container. CI⁠ runs these commands to check that they work.

# open a shell, with the current directory as the home directory
docker run --rm -it -v .:/home/inkscape -w /home/inkscape aljazmc/inkscape-alpine

# export drawing.svg to drawing.pdf
docker run --rm -v .:/home/inkscape -w /home/inkscape aljazmc/inkscape-alpine inkscape drawing.svg -o drawing.pdf

# and to a 400 pixels wide drawing.png
docker run --rm -v .:/home/inkscape -w /home/inkscape aljazmc/inkscape-alpine inkscape drawing.svg -w 400 -o drawing.png

⁠Usage with Docker Compose

## docker-compose.yml file
services:
    inkscape:
        image: aljazmc/inkscape-alpine
        user: ${UID:-1000}:${GID:-1000}
        working_dir: /home/inkscape
        volumes:
            - .:/home/inkscape
            - /home/$USER/.Xauthority:/home/inkscape/.Xauthority
            - $XDG_RUNTIME_DIR:/run/user/1000
            - /tmp/.X11-unix:/tmp/.X11-unix
            - /var/lib/dbus/machine-id:/var/lib/dbus/machine-id
        devices:
            - /dev/dri:/dev/dri
            - /dev/snd:/dev/snd
        group_add:
            - "992" # render group: stat -c %g /dev/dri/renderD128
            - "44"  # video group: stat -c %g /dev/dri/card0
            - "29"  # audio group: stat -c %g /dev/snd/controlC0
        environment:
            DISPLAY: $DISPLAY
            HOME: /home/inkscape
            XDG_RUNTIME_DIR: /run/user/1000
        network_mode: host

## start container shell
docker compose run --rm inkscape sh -c "sh"

## export drawing.svg to drawing.pdf
docker compose run --rm inkscape sh -c "inkscape drawing.svg --export-type=pdf"

⁠Notes

  • Not intended for production use.
  • The container user needs the host's render, video and audio groups (group_add) to use the GPU and the sound card. Without them, apps fall back to software rendering. The group ids differ between distributions: stat -c %g /dev/dri/renderD128 /dev/dri/card0 /dev/snd/controlC0.
  • There is no X server or audio server inside the container. Apps use the host's X server (DISPLAY, /tmp/.X11-unix) and the host's PipeWire/PulseAudio (XDG_RUNTIME_DIR).
  • Alpine Linux uses musl instead of glibc, so binaries built on glibc distributions (e.g. Debian, Ubuntu, Fedora) don't run here. Use Alpine packages or programs built on Alpine.
  • Every bundled Python extension works, including the GTK based ones (python3-gi), plotter output (pyserial), web image import (requests), optimized SVG (scour) and the import/export helpers (ghostscript, fig2dev, imagemagick, libwmf, rsvg-convert).
  • scour is installed with pip because Alpine only packages it in the testing repository.
  • bash and findutils (GNU find) are included for bash scripts that use find -printf.

⁠Tags

  • latest: the newest build.
  • 1.4.2: the Inkscape version in the image, e.g. aljazmc/inkscape-alpine:1.4.2. Use it to stay on a known version.
  • 1.4.2-YYYYMMDD: the same version, built on that date (UTC), e.g. 1.4.2-20261122. Every build gets its own tag that never moves, so use it where you need exactly the same image again.
  • Inkscape is the Alpine inkscape package, pinned with INKSCAPE_VERSION in the Dockerfile (inkscape~1.4.2).

⁠License

The Dockerfile, the scripts and this README are part of aljazmc/dockerfiles⁠, released under the MIT License⁠.

The software in the image keeps its own license:

SoftwareLicenseIn the image
Inkscape⁠GPL-2.0-or-laterapk info --license inkscape: GPL-2.0-or-later AND LGPL-2.1-or-later

Every other package keeps its license too: apk info --license <package> shows it on Alpine, /usr/share/doc/<package>/copyright on Debian.

Tag summary

Content type

Image

Digest

sha256:646181fc6…

Size

252.9 MB

Last updated

2 days ago

docker pull aljazmc/inkscape-alpine