You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am using the npm module chartjs-node-canvas to create the chart and add it to my email. I am getting the wanted result without running the javascript script as a docker container. Here is the result got after running my javascript script with docker :
Versions
NodeJS version: 16.19
Chart.JS version: 3.8
Additional context
Dockerfile
FROM ubuntu:latest
RUN mkdir -p /usr/src/app/script
WORKDIR /usr/src/app
COPY . /usr/src/app/script
RUN apt-get update && apt-get upgrade -y && apt-get -y install curl && curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs
COPY package*.json ./
RUN npm install -g
RUN npm i chartjs-node-canvas chart.js
RUN apt-get update && apt-get -y install cron
RUN chmod +x script/src/DailyReports.js script/src/GenerateReport.js script/entrypoint.sh
ENTRYPOINT ["/usr/src/app/script/entrypoint.sh"]
The text was updated successfully, but these errors were encountered:
You could add apt install fonts-freefont-ttf in your Dockerfile, although it will choose random font to display onto unless you specify it explicitly. #105 (comment)
Describe the bug
I am using the npm module
chartjs-node-canvas
to create the chart and add it to my email. I am getting the wanted result without running the javascript script as a docker container. Here is the result got after running my javascript script with docker :Versions
Additional context
Dockerfile
The text was updated successfully, but these errors were encountered: