ramsey / Dockerfile
Yakova's picture
Update Dockerfile
cc80e6b verified
raw
history blame
1.12 kB
FROM mbonea/whats-ramsey:0.0.4
# Create a non-root user
RUN useradd -ms /bin/bash admin
# Set the working directory
WORKDIR /srv
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 . /srv
# Give read and write permissions to the admin user
RUN chown -R admin:admin /srv
RUN chmod 755 /srv
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