简体   繁体   English

需要在docker node:alpine image中使用wkhtmltopdf

[英]Need to use wkhtmltopdf in docker node:alpine image

I have image docker image node:alpine , need to use wkhtmltopdf in some part of my API services. 我有图像泊坞窗图像节点:alpine,需要在我的API服务的某些部分中使用wkhtmltopdf。 Here is my docker file 这是我的码头工人文件

FROM node:alpine

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
COPY package.json .
# For npm@5 or later, copy package-lock.json as well
# COPY package.json package-lock.json .

RUN npm install

# Bundle app source
COPY . .

EXPOSE 8080

CMD [ "npm", "start" ]

remember i already have wkhtmltopdf container on my docker 记得我已经在我的docker上有了wkhtmltopdf容器

You can download it from its repo on github and call the binary within your container: 您可以从github的仓库中下载它,并在容器中调用二进制文件:

RUN curl -L https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | tar -xJ

The above downloads and extracts it in your active working directory in your docker image. 上面的代码将其下载并解压缩到docker映像中的活动工作目录中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Node Alpine Docker 镜像上安装 Python3 - Install Python3 on Node Alpine Docker Image Docker 节点高山映像构建在 node-gyp 上失败 - Docker Node Alpine Image Build Fails on node-gyp Docker 节点未安装在 alpine 上 - Docker Node not installing on alpine 在高山Docker中找不到节点 - Node not found in alpine docker 选择Node Alpine Docker镜像版本时查找相关信息 - Finding relevant info when choosing Node Alpine Docker image version 将 bcrypt 添加到 package.json 时,如何使用 docker 节点高山图像解决“无法找到要使用的任何 Python 安装”? - How to solve "Could not find any Python installation to use" with docker node alpine Image when adding bcrypt to package.json? 如何在 alpine:3.17 镜像中使用 node LTS 版本? - How to use node LTS version in alpine:3.17 image? 无法在节点上构建 node-re2:12.18.1-alpine docker 映像 - Failing to build node-re2 on a node:12.18.1-alpine docker image 在 Node Alpine Docker 图像中解压缩不处理 utf-8:如何设置正确的语言环境? - Unzip not handling utf-8 in Node Alpine Docker image: how to set correct locale? Docker ubuntu:16.04 图像需要 vpn 证书才能正常工作,但 node:14-alpine3.12 不需要? - Docker ubuntu:16.04 image needed vpn certificates to work correctly, but node:14-alpine3.12 does not?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM