title: pdftk docker composer for other container
body: <p>I'm using container ubuntu 18.04 and want use pdtk </p>
  
  <p>I found this </p>
  
  <p><a href="https://github.com/mnuessler/docker-pdftk" rel="nofollow noreferrer">https://github.com/mnuessler/docker-pdftk</a></p>
  
  <p>how i can use this pdtk in other container ? </p>
  
  <p>when i add </p>
  
  <p>docker-compose </p>
  
  <pre><code>version: "3.1"
  services:
    pdftk:
      build: docker/pdf-tk
      working_dir: /application
      volumes:
        - .:/application
  
  
    php:
      build: docker/php-fpm # this is 18.04 and php
      working_dir: /application
      volumes:
        - .:/application
  </code></pre>
  
  <p>when i start </p>
  
  <p>i get </p>
  
  <pre><code>pdftk_1_115fe12f025a exited with code 0
  </code></pre>
  
  <p>in log i see </p>
  
  <pre><code>SYNOPSIS
  
  
         pdftk &lt;input PDF files | - | PROMPT&gt;
  
  
          [ input_pw &lt;input PDF owner passwords | PROMPT&gt; ]
  
  
          [ &lt;operation&gt; &lt;operation arguments&gt; ]
  
  
          [ output &lt;output filename | - | PROMPT&gt; ]
  
  
          [ encrypt_40bit | encrypt_128bit ]
  
  
          [ allow &lt;permissions&gt; ]
  
  
          [ owner_pw &lt;owner password | PROMPT&gt; ]
  
  
          [ user_pw &lt;user password | PROMPT&gt; ]
  
  
          [ flatten ] [ need_appearances ]
  
  
          [ compress | uncompress ]
  
  
          [ keep_first_id | keep_final_id ] [ drop_xfa ] [ drop_xmp ]
  
  
          [ verbose ] [ dont_ask | do_ask ]
  
  
         Where:
  
  
          &lt;operation&gt; may be empty, or:
  
  
          [ cat | shuffle | burst | rotate |
  
  
            generate_fdf | fill_form |
  
  
            background | multibackground |
  
  
            stamp | multistamp |
  
  
            dump_data | dump_data_utf8 |
  
  
            dump_data_fields | dump_data_fields_utf8 |
  
  
            dump_data_annots |
  
  
            update_info | update_info_utf8 |
  
  
            attach_files | unpack_files ]
  
  
  
  
         For Complete Help: pdftk --help
  </code></pre>
  
  <p>How i can connect to pdftk from other container ? </p>
  
  <p>When i try add to Dockerfile pdftk </p>
  
  <pre><code>ENTRYPOINT ["/bin/bash"]
  </code></pre>
  
  <p>still have </p>
  
  <pre><code>pdftk_1_115fe12f025a exited with code 0
  </code></pre>
  
  <p>If i understand i need run in this container some daemon - how to setup it to I can connect from other container to this and use pdftk app ?</p>
  
  <p>UPDATE 2</p>
  
  <p>Ok i found way to install pdftk in ubuntu 18.04 container </p>
  
  <pre><code>RUN apt-get -y install libbcprov-java libcommons-lang3-java default-jre-headless
  
  
  RUN cd /tmp
  RUN wget http://fr.archive.ubuntu.com/ubuntu/pool/universe/p/pdftk-java/pdftk-java_3.0.2-2_all.deb
  RUN dpkg -i pdftk-java_3.0.2-2_all.deb
  </code></pre>