GithubHelp home page GithubHelp logo

isabella232 / docker-wkhtmltopdf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from surnet/docker-wkhtmltopdf

0.0 0.0 0.0 65 KB

wkhtmltopdf for multiple base images

Home Page: https://hub.docker.com/u/surnet/

License: MIT License

Shell 100.00%

docker-wkhtmltopdf's Introduction

docker-wkhtmltopdf

This repo contains scripts to create docker images which will be available in multiple variants.

The purpose is to publish docker images with a working and patched wkhtmltopdf installation and keep them as small as possible while delivering all functions.

Naming

The published images follow a naming convention.

Image name

The image name follows the format:

surnet/<os>-<base>-wkhtmltopdf or surnet/<os/base>-wkhtmltopdf

  • <os> matches the underlaying os.
  • <base> matches the used base image.
  • <os/base> matches the used base image if the os and base image are the same.

e.g. surnet/alpine-node-wkhtmltopdf or surnet/alpine-wkhtmltopdf

Tags

The tags represent version numbers which follow the format:

<1>-<2>-<3>

  • <1> matches the version of the base image.
  • <2> matches the wkhtmltopdf version.
  • <3> matches the Edition (see next chapter).

e.g. 3.12.4-0.12.6-small

Editions

There are two editions available for each version.

  • small contains only wkhtmltopdf. This should be sufficient for most use-cases
  • full contains wkhtmltopdf, wkhtmltoimage and the libraries.

Available Images

surnet/alpine-wkhtmltopdf

Docker Stars Docker Pulls

This image can be used as a base for your project or directly used via bash.

For a list of available versions please see the page on Docker Hub or the GitHub Container Registry. If a version you would like is missing please open an issue on this repo.

Docker Hub

FROM surnet/alpine-wkhtmltopdf:<version>
docker run surnet/alpine-wkhtmltopdf:<version> google.com - > test.pdf

GitHub Container Registry

FROM ghcr.io/surnet/alpine-wkhtmltopdf:<version>
docker run ghcr.io/surnet/alpine-wkhtmltopdf:<version> google.com - > test.pdf

surnet/alpine-node-wkhtmltopdf

Docker Stars Docker Pulls

This image can be used as a base for your NodeJS project.

For a list of available versions please see the page on Docker Hub or the GitHub Container Registry. If a version you would like is missing please open an issue on this repo.

Docker Hub

FROM surnet/alpine-node-wkhtmltopdf:<version>

GitHub Container Registry

FROM ghcr.io/surnet/alpine-node-wkhtmltopdf:<version>

surnet/alpine-python-wkhtmltopdf

Docker Stars Docker Pulls

This image can be used as a base for your Python project.

For a list of available versions please see the page on Docker Hub or the GitHub Container Registry. If a version you would like is missing please open an issue on this repo.

Docker Hub

FROM surnet/alpine-python-wkhtmltopdf:<version>

GitHub Container Registry

FROM ghcr.io/surnet/alpine-python-wkhtmltopdf:<version>

Other Images

If you are using another image based on alpine you can use the following Dockerfile as a starting point. Just replace the openjdk:8-jdk-alpine3.9 with the alpine based image you would like to use. If you do not need wkhtmltoimage or the libs omit the last two lines.

FROM surnet/alpine-wkhtmltopdf:3.9-0.12.5-full as wkhtmltopdf
FROM openjdk:8-jdk-alpine3.9

# Install dependencies for wkhtmltopdf
RUN apk add --no-cache \
  libstdc++ \
  libx11 \
  libxrender \
  libxext \
  libssl1.1 \
  ca-certificates \
  fontconfig \
  freetype \
  ttf-dejavu \
  ttf-droid \
  ttf-freefont \
  ttf-liberation \
  ttf-ubuntu-font-family \
&& apk add --no-cache --virtual .build-deps \
  msttcorefonts-installer \
\
# Install microsoft fonts
&& update-ms-fonts \
&& fc-cache -f \
\
# Clean up when done
&& rm -rf /tmp/* \
&& apk del .build-deps

# Copy wkhtmltopdf files from docker-wkhtmltopdf image
COPY --from=wkhtmltopdf /bin/wkhtmltopdf /bin/wkhtmltopdf
COPY --from=wkhtmltopdf /bin/wkhtmltoimage /bin/wkhtmltoimage
COPY --from=wkhtmltopdf /bin/libwkhtmltox* /bin/

Contribute

Please feel free to open a issue or pull request with suggestions.

Keep in mind that the build process of these container takes some (a lot of) time.

Credits

Based upon the following repos/inputs:

docker-wkhtmltopdf's People

Contributors

chdanielmueller avatar mareksuscak avatar rainbow-six3 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.