Providing a Docker Application to Host

I want to run an outdated centos6 compatible application that no longer supports some dependencies and therefore is not compatible with centos7. This application is called pdftk.

I want (if possible), run pdftk in the centos6 docker image and put this application in centos7 ...

The application performs a couple of actions:

It accepts a PDF document as input and form data as input → fills a PDF with form data → displays a completed PDF file.

A command might look something like this:

pdftk input.pdf --do-something output.pdf 

Is it possible to do something similar with a docker?

So far, I have managed to initialize the centos6 image and successfully install pdftk. Any help with the next part (if possible) would be most appreciated.

thanks

+5
source share
1 answer

You can write a Docker file with a Centos6 database, and then install pdftk and any other dependency. Finally, use the Dockerfile ENTRYPOINT ENTRYPOINT to set pdftk as the command for your image and pass arguments to it. For example (I have not tested it, this is just an example):

 FROM centos:centos6 RUN yum install pdftk ENTRYPOINT ["/usr/bin/pdftk"] 

Then you can create this image. Suppose you call it "pdftk", you can run the container as: docker run -it --rm pdftk <arguments>docker run -it --rm -v ~/my_pdfs:/pdfs pdftk /pdfs/input.pdf --do-something /pdfs/output.pdf

+6
source

Source: https://habr.com/ru/post/1212493/


All Articles