-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 843 Bytes
/
Dockerfile
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
FROM node:18-alpine
MAINTAINER Giovanni Orciuolo <giovanni@orciuolo.it>
# Installs latest Chromium package and ffmpeg
RUN echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \
&& echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \
&& apk add --no-cache \
ffmpeg@edge \
chromium@edge \
&& rm -rf /var/cache/* \
&& mkdir /var/cache/apk
# Setup Chrome environment variables to point to Chromium bin
ENV CHROME_BIN=/usr/bin/chromium-browser \
CHROME_PATH=/usr/lib/chromium/
WORKDIR /home/app
# Copy package.json
COPY package.json /home/app/package.json
COPY yarn.lock /home/app/yarn.lock
# Install dependencies
RUN yarn --prod --ignore-engines
# Copy project source files
COPY . /home/app
# Start application inside PM2
CMD [ "node", "src/index.js" ]