Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Web2PDF Dockerfile

This repository contains Dockerfile of Web2PDF for Docker

Docker image

Latest docker image is built and hosted on docker hub. You can pull one by:

docker pull warenix/web2pdf:latest

Base Docker Image

app root

Application code is placed at /app

Installation

  1. Install Docker.
  2. Install Docker machine and compose.

Usage

  1. Build Web2PDF api server image:

    docker-compose build
  2. Start Web2PDF api server container:

    docker-compose up

    After few seconds, open localhost to see the api server is up and running.

  3. Test pdf conversion service is up

    sh test/test_pdf.sh

    You should see output like below:

    {
        "result": {
            "pdf_url": "http://localhost:8080/pdfout/yv2iWaQOLPN.pdf",
            "url": "http://hk.yahoo.com"
        }
    } 
    
0. Portforward from host to virtualbox
    If you cannot see Web2PDF api server container is responding to your requst, you may need to do pror forward from your host to the virtual box as below:

    ```sh
    cd docker/script; sh vbox_port_forward.sh
    ```
    
    You can try again then.
    

0. Test interactively

    ```sh
    docker run -u root -ti --rm -p8080:8080 --entrypoint=bash warenix/web2pdf:latest
    ```