2023-12-15 00:30:26 +00:00
|
|
|
# Build site using Node JS
|
|
|
|
FROM node:21-slim
|
|
|
|
|
|
|
|
# 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 Chromium that Puppeteer
|
|
|
|
# installs, work.
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y wget gnupg \
|
|
|
|
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
|
|
|
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
|
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get install -y chromium fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
ENV PUPPETEER_SKIP_DOWNLOAD true
|
|
|
|
|
|
|
|
# Install puppeteer so it's available in the container.
|
|
|
|
RUN npm init -y && \
|
|
|
|
npm i -g puppeteer
|
2023-04-20 05:40:12 +00:00
|
|
|
|
2023-04-22 18:06:06 +00:00
|
|
|
ARG BUILD_DATE
|
|
|
|
|
|
|
|
LABEL \
|
|
|
|
maintainer="Jordan Roher <jordan@notclickable.com>" \
|
|
|
|
org.opencontainers.image.authors="Jordan Roher <jordan@notclickable.com>" \
|
|
|
|
org.opencontainers.image.title="starbase-80" \
|
|
|
|
org.opencontainers.image.description="A nice app grid of icons for Docker services" \
|
|
|
|
org.opencontainers.image.created=$BUILD_DATE
|
|
|
|
|
2023-04-20 05:40:12 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY package.json .
|
|
|
|
RUN npm i
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2023-04-20 22:47:29 +00:00
|
|
|
ENV NODE_ENV production
|
2023-04-20 05:40:12 +00:00
|
|
|
|
2023-04-20 23:42:30 +00:00
|
|
|
ENV TITLE "My Website"
|
2023-04-21 04:44:37 +00:00
|
|
|
ENV LOGO "/logo.png"
|
2023-04-21 21:20:58 +00:00
|
|
|
ENV HEADER "true"
|
2023-04-21 22:08:24 +00:00
|
|
|
ENV HEADERLINE "true"
|
2023-04-21 23:01:14 +00:00
|
|
|
ENV HEADERTOP "false"
|
2023-04-21 22:02:15 +00:00
|
|
|
ENV CATEGORIES "normal"
|
2023-04-21 22:43:43 +00:00
|
|
|
ENV BGCOLOR "theme(colors.slate.50)"
|
2023-04-21 22:50:54 +00:00
|
|
|
ENV BGCOLORDARK "theme(colors.gray.950)"
|
2023-04-22 21:50:09 +00:00
|
|
|
ENV NEWWINDOW "true"
|
2023-04-20 23:42:30 +00:00
|
|
|
|
2023-04-22 18:06:06 +00:00
|
|
|
COPY version /
|
2023-12-14 23:48:21 +00:00
|
|
|
EXPOSE 4173
|
2023-04-22 18:06:06 +00:00
|
|
|
|
2023-04-21 00:53:59 +00:00
|
|
|
RUN chmod +x /app/docker-entrypoint.sh
|
2023-12-14 23:48:21 +00:00
|
|
|
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
2023-12-14 22:27:46 +00:00
|
|
|
|
2023-12-14 23:48:21 +00:00
|
|
|
CMD ["npm", "run", "start"]
|