-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 764 Bytes
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 764 Bytes
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
31
32
33
34
35
36
FROM node:alpine AS build
WORKDIR /src
COPY index.html ./
RUN npm --global --silent --no-update-notifier --no-fund install html-minifier-terser@latest \
&& mkdir -p /out \
&& html-minifier-terser \
--collapse-whitespace \
--remove-comments \
--minify-css true \
--minify-js true \
--remove-redundant-attributes \
--remove-script-type-attributes \
--remove-style-link-type-attributes \
--use-short-doctype \
--output /out/index.html \
/src/index.html
FROM node:alpine
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=8788
ENV IMAGEFETCH_RUNTIME=container
WORKDIR /app
COPY --from=build /out/index.html ./index.html
COPY server.js start.sh VERSION ./
RUN chmod +x /app/start.sh
EXPOSE 8788
CMD ["/app/start.sh"]