Skip to content

Instantly share code, notes, and snippets.

@chrismarksus
Last active November 20, 2018 17:25
Show Gist options
  • Save chrismarksus/3feb24521feef8ab1d080f1a00339304 to your computer and use it in GitHub Desktop.
Save chrismarksus/3feb24521feef8ab1d080f1a00339304 to your computer and use it in GitHub Desktop.
Inkscape Dockerfile
FROM alpine:latest
RUN apk --no-cache add \
inkscape \
ttf-inconsolata \
ttf-liberation \
ttf-linux-libertine \
ttf-opensans \
ttf-ubuntu-font-family && \
adduser -D inkscape
USER inkscape
ENV HOME /home/inkscape
RUN mkdir -p $HOME/.local/share
RUN mkdir -p /home/inkscape/.local/share
RUN mkdir -p /home/inkscape/.config/inkscape
VOLUME $HOME/workspace
WORKDIR $HOME/workspace
ENTRYPOINT ["/usr/bin/inkscape"]
#!/usr/bin/env bash
if [ ! -d "$HOME/.config/inkscape" ]; then
echo "Making .config/inkscape in the local dir."
mkdir -p $HOME/.config/inkscape
fi
if [ ! -d "$HOME/.local/inkscape/share" ]; then
echo "Making .local/inkscape/share in the local dir."
mkdir -p $HOME/.local/inkscape/share
fi
docker run --rm \
-e DISPLAY \
-u `id -u $USER` \
-v $HOME/.config/inkscape:/home/inkscape/.config/inkscape \
-v $HOME/.local/inkscape/share:/home/inkscape/.local/share/ \
-v $(pwd):/home/inkscape/workspace \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME/.fonts:/home/inkscape/.fonts \
cmarks/docker-inkscape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment