-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (30 loc) · 1.07 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
# syntax=docker/dockerfile:1
FROM plone/frontend-builder:17 as SOURCE
FROM node:18-bullseye-slim
COPY --from=SOURCE --chown=node:node /setupAddon /setupAddon
COPY --from=SOURCE --chown=node:node /app /app
LABEL maintainer="Plone Community <dev@plone.org>" \
org.label-schema.name="frontend-base" \
org.label-schema.description="Plone frontend builder image" \
org.label-schema.vendor="Plone Foundation"
RUN <<EOT
set -e
apt update
apt install -y --no-install-recommends python3 build-essential git ca-certificates
npm install --no-audit --no-fund -g yo @plone/generator-volto@8
rm -rf /var/lib/apt/lists/*
EOT
WORKDIR /app
RUN corepack enable
USER node
RUN <<EOT
set -e
yarn install --network-timeout 1000000
EOT
USER root
RUN runDeps="ca-certificates git chromium libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb wget procps jq" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $runDeps \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
USER node