File size: 1,156 Bytes
f28ae2d 428c6c4 cc80e6b 13e22d3 52b4884 afef2bb 51f8a09 afef2bb d8078ab f0d71ed 428c6c4 f0d71ed d8078ab cc80e6b 52b4884 cc80e6b afef2bb 13e22d3 52b4884 54a79a5 cc80e6b 44e7287 d8078ab f0d71ed 4dc7f7e 8e97533 d8078ab |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
FROM mbonea/whats-ramsey:0.0.4
# Create a non-root user
RUN useradd -ms /bin/bash admin
WORKDIR /usr/src/app
# Set the working directory
RUN npm install --no-cache
# Install necessary packages for Puppeteer
RUN apt-get update \
&& apt-get install -y wget --no-install-recommends \
&& apt-get install -y \
libnss3 \
libatk-bridge2.0-0 \
libxcomposite1 \
libxrandr2 \
libxdamage1 \
libpango-1.0-0 \
libxshmfence1 \
libgbm1 \
libasound2 \
libpangocairo-1.0-0 \
libgtk-3-0 \
libx11-xcb1 \
libx11-xcb1 \
libxkbcommon0 \
&& rm -rf /var/lib/apt/lists/*
RUN npx playwright install
# If your application requires any environment variables, set them here
# ENV NODE_ENV=production
RUN npm install -g http-server
# Copy the application code
COPY --chown=admin . /usr/src/app
# Give read and write permissions to the admin user
RUN chown -R admin:admin /usr/src/app
RUN chmod 777 /usr/src/app
USER admin
# Expose the port your application runs on
EXPOSE 7860
# Define the command to run the start script
CMD npx playwright install && npm start & http-server public -p 7860
|