oneuptime/lighthouse-runner/Dockerfile

37 lines
752 B
Docker
Raw Normal View History

2021-06-30 11:56:08 +00:00
#
# Fyipe-backend Dockerfile
#
# Pull base image nodejs image.
FROM node:16
#SET ENV Variables
ENV PRODUCTION=true
ENV CHROME_PATH=/usr/bin/google-chrome
# Install Chrome.
RUN \
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \
apt-get update && \
apt-get install -y google-chrome-stable && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package*.json /usr/src/app/
RUN npm ci --only=production
# Bundle app source
COPY . /usr/src/app
# Expose ports.
# - 3001: Lighthouse Runner
EXPOSE 3001
#Run the app
CMD [ "npm", "start"]