Created
May 20, 2024 14:33
-
-
Save gtrabanco/6c203ac534d221e20c4a3c778227ffd9 to your computer and use it in GitHub Desktop.
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
FROM oven/bun:1-debian | |
ENV DBUS_SESSION_BUS_ADDRESS autolaunch: | |
# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) | |
# Note: this installs the necessary libs to make the bundled version of Chrome that Puppeteer | |
# installs, work. | |
RUN apt update -y | |
RUN apt install -y wget gnupg | |
RUN apt install -y \ | |
fonts-ipafont-gothic fonts-wqy-zenhei \ | |
fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf \ | |
libxss1 dbus dbus-x11 \ | |
--no-install-recommends | |
RUN apt install -y chromium | |
RUN service dbus start | |
RUN rm -rf /var/lib/apt/lists/* | |
RUN apt autoremove --purge | |
RUN apt autoclean | |
RUN apt clean | |
RUN groupadd -r bunapp \ | |
&& useradd -rm -g bunapp -G audio,video bunapp | |
USER bunapp | |
WORKDIR /app | |
VOLUME /app/courses | |
# Installing deps | |
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | |
ENV PUPPETEER_SKIP_DOWNLOAD true | |
COPY --chown=bunapp:bunapp bun.lockb /app/ | |
COPY --chown=bunapp:bunapp package.json /app/ | |
RUN bun install --frozen-lockfile | |
# App | |
COPY --chown=bunapp:bunapp . /app/ | |
# COPY --chown=bunapp:bunapp package.json /app/ | |
# COPY --chown=bunapp:bunapp types.d.ts /app/ | |
# COPY --chown=bunapp:bunapp tsconfig.json /app/ | |
# COPY --chown=bunapp:bunapp puppeteer.config.cjs /app/ | |
# COPY --chown=bunapp:bunapp bun.lockb /app/ | |
CMD ["bun", "start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment