User Tools

Site Tools


linux_og_unix:pdftk_eksempel

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux_og_unix:pdftk_eksempel [2019/04/02 11:25] (current)
Martin Møller Skarbiniks Pedersen created
Line 1: Line 1:
 +[[linux_og_unix:​docker|Tilbage til Docker]]
 +
 +----
 +
 +==== Eksempel med at få pdftk installeret ====
 +
 +Forbedrelse:​
 +<​code>​
 +sudo apt install docker.io
 +sudo usermod -a -G docker $USER
 +</​code>​
 +
 +Terminal 1:
 +<​code>​sudo docker run -it ubuntu:​16.04 bash
 +apt update
 +apt install pdftk
 +</​code>​
 +
 +Terminal 2:
 +<​code>​
 +sudo docker ps -a
 +sudo docker commit CONTAINER_ID ubuntu_pdftk
 +</​code>​
 +
 +**/​usr/​local/​bin/​pdftk**
 +<​code>​
 +#!/bin/sh
 +
 +docker run --name pdftk-$$ --user $(id -u):$(id -g) \
 +  -it -v "​$PWD:/​workdir$PWD"​ -w "/​workdir$PWD"​ ubuntu_pdftk pdftk "​$@"​
 +docker rm pdftk-$$
 +</​code>​
 +
  
linux_og_unix/pdftk_eksempel.txt · Last modified: 2019/04/02 11:25 by Martin Møller Skarbiniks Pedersen