小编Fil*_*lla的帖子

Docker 在构建时无法找到包 (wkhtmltopdf)

编辑

在排除故障时,我遇到了不同的错误:

...
Err:1 http://deb.debian.org/debian bullseye InRelease
  Temporary failure resolving 'deb.debian.org'
...
Run Code Online (Sandbox Code Playgroud)

我猜这与我的防火墙设置(nftables)有关运行
docker run busybox nslookup google.com 给了我
;; connection timed out; no servers could be reached所以docker没有与外部的连接?

系统

开发环境:Ubuntu 22.04
生产环境:debian 10.12 64bit / Linux 4.19.0-20-amd64

我的节点后端文件夹中的 Dockerfile

FROM node:slim

# Install wkhtmltopdf
RUN apt-get update
RUN apt-get install -y wkhtmltopdf

RUN npm install -g pm2@latest

WORKDIR /var/api

COPY . .

RUN npm i

EXPOSE 10051-10053

# Start PM2 as PID 1 process
ENTRYPOINT ["pm2-runtime"]
CMD …
Run Code Online (Sandbox Code Playgroud)

linux ubuntu debian apt docker

2
推荐指数
1
解决办法
2382
查看次数

标签 统计

apt ×1

debian ×1

docker ×1

linux ×1

ubuntu ×1