Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -6
Dockerfile
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
|
|
| 1 |
FROM node:16
|
| 2 |
|
| 3 |
-
# Install latest chrome dev package and fonts to support major charsets
|
| 4 |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
| 5 |
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
|
| 6 |
&& apt-get update \
|
| 7 |
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
|
| 8 |
-
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
# Create app directory
|
| 12 |
WORKDIR /usr/src/app
|
| 13 |
|
| 14 |
# Add user so we don't need --no-sandbox.
|
|
@@ -27,12 +27,11 @@ COPY . .
|
|
| 27 |
RUN chown -R pptruser:pptruser /usr/src/app
|
| 28 |
|
| 29 |
# Create a directory for temporary files with correct permissions
|
| 30 |
-
RUN mkdir -p /tmp/marp-work && chown -R pptruser:pptruser /tmp/marp-work
|
| 31 |
|
| 32 |
# Run everything after as non-privileged user.
|
| 33 |
USER pptruser
|
| 34 |
|
| 35 |
-
# Expose port
|
| 36 |
EXPOSE 7860
|
| 37 |
-
|
| 38 |
CMD ["node", "server.js"]
|
|
|
|
| 1 |
+
# Dockerfile
|
| 2 |
FROM node:16
|
| 3 |
|
| 4 |
+
# Install latest chrome dev package and fonts to support major charsets
|
| 5 |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
| 6 |
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
|
| 7 |
&& apt-get update \
|
| 8 |
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
|
| 9 |
+
--no-install-recommends \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
|
|
|
| 12 |
WORKDIR /usr/src/app
|
| 13 |
|
| 14 |
# Add user so we don't need --no-sandbox.
|
|
|
|
| 27 |
RUN chown -R pptruser:pptruser /usr/src/app
|
| 28 |
|
| 29 |
# Create a directory for temporary files with correct permissions
|
| 30 |
+
RUN mkdir -p /tmp/marp-work && chown -R pptruser:pptruser /tmp/marp-work && chmod 755 /tmp/marp-work
|
| 31 |
|
| 32 |
# Run everything after as non-privileged user.
|
| 33 |
USER pptruser
|
| 34 |
|
|
|
|
| 35 |
EXPOSE 7860
|
| 36 |
+
|
| 37 |
CMD ["node", "server.js"]
|