ramsey / Dockerfile
Yakova's picture
Update Dockerfile
54a79a5 verified
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