File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 11FROM node:20-slim
2+
23RUN groupadd -r botuser && useradd -r -g botuser -d /app -s /bin/bash botuser
4+
5+ # Set the working directory inside the container
36WORKDIR /app
7+
48RUN chown -R botuser:botuser /app
9+
510RUN apt-get update && \
611 apt-get install -y --no-install-recommends \
712 wget \
@@ -25,12 +30,18 @@ RUN apt-get update && \
2530 xdg-utils \
2631 chromium \
2732 graphicsmagick \
33+ ghostscript \
2834 && rm -rf /var/lib/apt/lists/* \
2935 && apt-get clean
36+
3037ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
38+
3139COPY --chown=botuser:botuser package*.json ./
40+
3241USER botuser
42+
3343RUN npm ci --omit=dev && \
3444 npm cache clean --force
3545COPY --chown=botuser:botuser . .
46+
3647CMD ["node" , "./src/bot.js" ]
You can’t perform that action at this time.
0 commit comments