generated from actions/container-toolkit-action
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,4 @@ | ||
FROM node:10-alpine | ||
FROM fifsky/html-to-pdf | ||
LABEL MAINTAINER="Xudong Cai <[email protected]>" | ||
ENV TZ=Asia/Shanghai | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | ||
|
||
#[email protected] | ||
RUN apk update && apk upgrade && \ | ||
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \ | ||
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \ | ||
apk --no-cache add \ | ||
tzdata \ | ||
curl \ | ||
ca-certificates \ | ||
chromium@edge \ | ||
nss@edge \ | ||
fontconfig \ | ||
freetype \ | ||
ttf-dejavu \ | ||
ttf-droid \ | ||
ttf-freefont \ | ||
mesa-egl \ | ||
mesa-gles \ | ||
&& mkdir /usr/lib/chromium/swiftshader/ \ | ||
&& cp /usr/lib/libGLESv2.so.2 /usr/lib/chromium/swiftshader/libGLESv2.so \ | ||
&& cp /usr/lib/libEGL.so.1 /usr/lib/chromium/swiftshader/libEGL.so \ | ||
&& ln -sf /usr/bin/chromium-browser /usr/local/bin/chrome \ | ||
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \ | ||
&& echo $TZ > /etc/timezone \ | ||
&& mkdir -p /usr/share/fonts/chinese/TrueType/ | ||
COPY simsun.ttf /usr/share/fonts/chinese/TrueType/simsun.ttf | ||
RUN fc-cache -fv | ||
|
||
COPY . . | ||
|
||
RUN npm install --production | ||
|
||
ENTRYPOINT ["node", "/lib/main.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM node:10-alpine | ||
LABEL MAINTAINER="Xudong Cai <[email protected]>" | ||
ENV TZ=Asia/Shanghai | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | ||
|
||
#[email protected] | ||
RUN sed -i 's!http://dl-cdn.alpinelinux.org/!https://mirrors.aliyun.com/!g' /etc/apk/repositories \ | ||
&& apk update && apk upgrade && \ | ||
echo @edge https://mirrors.aliyun.com/alpine/edge/community >> /etc/apk/repositories && \ | ||
echo @edge https://mirrors.aliyun.com/alpine/edge/main >> /etc/apk/repositories && \ | ||
apk --no-cache add \ | ||
tzdata \ | ||
curl \ | ||
ca-certificates \ | ||
chromium@edge \ | ||
nss@edge \ | ||
fontconfig \ | ||
freetype \ | ||
ttf-dejavu \ | ||
ttf-droid \ | ||
ttf-freefont \ | ||
mesa-egl \ | ||
mesa-gles \ | ||
&& mkdir /usr/lib/chromium/swiftshader/ \ | ||
&& cp /usr/lib/libGLESv2.so.2 /usr/lib/chromium/swiftshader/libGLESv2.so \ | ||
&& cp /usr/lib/libEGL.so.1 /usr/lib/chromium/swiftshader/libEGL.so \ | ||
&& ln -sf /usr/bin/chromium-browser /usr/local/bin/chrome \ | ||
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \ | ||
&& echo $TZ > /etc/timezone \ | ||
&& mkdir -p /usr/share/fonts/chinese/TrueType/ | ||
COPY simsun.ttf /usr/share/fonts/chinese/TrueType/simsun.ttf | ||
RUN fc-cache -fv | ||
|
||
COPY . . | ||
|
||
RUN npm install --production | ||
|
||
ENTRYPOINT ["node", "/lib/main.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
"actions", | ||
"container", | ||
"toolkit", | ||
"setup" | ||
"pdf" | ||
], | ||
"author": "[email protected]", | ||
"license": "MIT", | ||
|