Skip to content

Instantly share code, notes, and snippets.

@hiroMTB
Created November 15, 2021 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiroMTB/acf2c7510aede89a36ec6233acd776b8 to your computer and use it in GitHub Desktop.
Save hiroMTB/acf2c7510aede89a36ec6233acd776b8 to your computer and use it in GitHub Desktop.
Ubuntu 20.10 librsvg

macOS terminal

docker pull ubuntu:impish
docker run -it --name="ubuntu-impish" ubuntu:impish /bin/bash

docker

apt-get update
apt-get install librsvg2-bin
rsvg-convert -v
  -> 2.50.7

from macOS terminal

// check container id
docker ps
-> [your container ID]

// copy svg from local to container
docker cp ./original-mod.svg [your container ID]:/tmp/original-mod.svg

docker

// check if we have svg
cd tmp
ls
-> original-mod.svg

// convert!
rsvg-convert --format=png --output=original-mod.png original-mod.svg

// check if success
ls
-> original-mod.png original-mod.svg

macOS termainl, copy resulted png to local

docker cp [your container ID]:/tmp/original-mod.png ~/Desktop/from-docker.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment