mirror of https://github.com/sgoudham/carbon.git
add back Dockerfile
parent
71879a78d3
commit
4e142c8e5e
@ -0,0 +1,33 @@
|
|||||||
|
FROM node:9-alpine
|
||||||
|
|
||||||
|
# Installs latest Chromium (63) package.
|
||||||
|
RUN apk update && apk upgrade && \
|
||||||
|
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 \
|
||||||
|
chromium@edge \
|
||||||
|
nss@edge
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json ./
|
||||||
|
COPY yarn.lock ./
|
||||||
|
|
||||||
|
RUN yarn
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
# Add user so we don't need --no-sandbox.
|
||||||
|
RUN addgroup -S pptruser && adduser -S -g pptruser pptruser \
|
||||||
|
&& mkdir -p /home/pptruser/Downloads \
|
||||||
|
&& chown -R pptruser:pptruser /home/pptruser \
|
||||||
|
&& chown -R pptruser:pptruser /app
|
||||||
|
|
||||||
|
# Run everything after as non-privileged user.
|
||||||
|
USER pptruser
|
||||||
|
|
||||||
|
ENV NODE_ENV production
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD [ "yarn", "start" ]
|
Loading…
Reference in New Issue