|
FROM mcr.microsoft.com/playwright:focal |
|
|
|
|
|
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 |
|
|
|
|
|
ENV TZ=Asia/Jakarta |
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone |
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN --mount=type=secret,id=GITHUB_REPO,required=true \ |
|
git clone $(cat /run/secrets/GITHUB_REPO) . |
|
|
|
|
|
RUN npm install |
|
|
|
|
|
RUN npx playwright install --with-deps |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
wget \ |
|
fontconfig \ |
|
fonts-noto-color-emoji \ |
|
fontconfig \ |
|
--no-install-recommends && \ |
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN mkdir -p /usr/share/fonts/AppleColorEmoji && \ |
|
wget -O /usr/share/fonts/AppleColorEmoji/AppleColorEmoji.ttf \ |
|
https://github.com/samuelngs/apple-emoji-linux/releases/latest/download/AppleColorEmoji.ttf && \ |
|
fc-cache -f -v |
|
|
|
RUN fc-list | grep -i "AppleColorEmoji" |
|
|
|
|
|
ENV PORT=7860 |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["node", "app.js"] |