-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
51 lines (42 loc) · 1.3 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM node:16-slim as base
FROM base as builder
ENV VOLTO_MAJOR=15
ENV VOLTO_MINOR=11
ENV VOLTO_PATCH=2
ENV VOLTO_PRERELEASE=
ENV VOLTO_VERSION=${VOLTO_MAJOR}.${VOLTO_MINOR}.${VOLTO_PATCH}${VOLTO_PRERELEASE}
RUN apt-get update \
&& buildDeps="python3 build-essential" \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir build && chown -R node:node build \
&& npm install --no-audit --no-fund -g yo @plone/generator-volto
USER node
WORKDIR /build
# Generate new volto app
RUN yo @plone/volto \
plone-frontend \
--description "Plone frontend using Volto" \
--skip-addons \
--skip-install \
--skip-workspaces \
--volto=${VOLTO_VERSION} \
--no-interactive
RUN cd plone-frontend \
&& yarn install \
&& yarn build
FROM base
LABEL maintainer="Plone Community <dev@plone.org>" \
org.label-schema.name="plone-frontend" \
org.label-schema.description="Plone frontend image" \
org.label-schema.vendor="Plone Foundation"
RUN apt-get update \
&& buildDeps="busybox" \
&& apt-get install -y --no-install-recommends $buildDeps \
&& busybox --install -s \
&& rm -rf /var/lib/apt/lists/*
USER node
COPY --from=builder /build/plone-frontend/ /app/
WORKDIR /app
EXPOSE 3000
CMD ["yarn", "start:prod"]