ChartJS 显示正方形的图表

lmyy7pcs  于 2022-11-06  发布在  Chart.js
关注(0)|答案(1)|浏览(263)

我正在使用npm模块chartjs-node-canvas创建图表并将其添加到我的xlsx文件中。我得到了想要的结果,而没有将我的应用程序作为dokcer容器运行。下面是用dokker运行我的应用程序后得到的结果:

下面是我的Dockerfile:

FROM node:16.13.1-alpine3.13
RUN apk add dumb-init
RUN apk update
RUN apk upgrade
RUN apk add --no-cache  pixman
RUN apk add --no-cache libc6-compat && ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
RUN apk add --no-cache  libuuid
RUN apk add --no-cache  glib
RUN apk add --update  autoconf gcc g++ make libaio-dev libnsl gettext-dev automake libtool libc6-compat
RUN apk add --update libaio libnsl &&  ln -s /usr/lib/libnsl.so.2 /usr/lib/libnsl.so.1
RUN apk add musl-dev libaio autoconf && apk add --update make
RUN apk add --update && apk add --no-cache ffmpeg opus pixman cairo pango giflib ca-certificates  && apk add --no-cache --virtual .build-deps git curl build-base jpeg-dev pixman-dev
RUN apk --no-cache --virtual .canvas-build-deps add  build-base  cairo-dev  jpeg-dev  pango-dev  giflib-dev  pixman-dev pangomm-dev libjpeg-turbo-dev freetype-dev  && apk --no-cache add  pixman  cairo  pango  giflib
RUN apk --no-cache --virtual .canvas-build-deps add build-base  cairo-dev jpeg-dev pango-dev  giflib-dev pixman-dev  pangomm-dev  libjpeg-turbo-dev  freetype-dev 
RUN apk --no-cache add pixman  cairo  pango  giflib
ccgok5k5

ccgok5k51#

我不知道确切的原因,但我遇到了与node:16-alpine相同的问题,它是通过使用node:16修复。

相关问题