forked from eclipse-che/che-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile
116 lines (106 loc) · 3.12 KB
/
Containerfile
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Container definition
#
# Copyright (c) 2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial implementation
#
# Container to build and test Eclipse Che documentation
# Require podman to run ccutil
FROM quay.io/podman/stable:latest
# Require superuser privileges to install packages
USER root
EXPOSE 4000
EXPOSE 35729
LABEL \
description="Tools to build Eclipse Che documentation." \
io.k8s.display-name="che-docs" \
license="Eclipse Public License - v 2.0" \
maintainer="Red Hat, Inc." \
name="eclipse/che-docs" \
source="https://github.com/eclipse-chhe/che-docs/blob/main/Containerfile" \
summary="Tools to build Eclipse Che documentation" \
URL="quay.io/eclipse/che-docs" \
vendor="Eclipse Che documentation team" \
version="2022.11"
# Install system packages
RUN set -x \
&& dnf install --assumeyes --quiet dnf-plugins-core \
&& dnf copr enable --assumeyes --quiet mczernek/vale \
&& dnf install --assumeyes --quiet \
ShellCheck \
bash \
curl \
file \
findutils \
gcc \
git-core \
graphviz \
grep \
htmltest \
jq \
nodejs \
python3-pip \
rsync \
shyaml \
tar \
tox \
tree \
unzip \
vale \
wget \
which \
&& dnf clean all --quiet \
&& dot -v \
&& node --version \
&& vale --version
# Install Python packages
RUN set -x \
&& pip3 install --no-cache-dir --no-input --quiet \
diagrams \
yq \
&& yq --version
# WORKDIR is a Node.js prerequisite
WORKDIR /tmp
# Avoid error: Local gulp not found in /projects
ENV NODE_PATH="/usr/local/lib/node_modules/"
# Install Node.js packages, one by one to avoid timeouts
RUN set -x \
&& npm install --no-save --global @antora/assembler \
&& npm install --no-save --global @antora/cli \
&& npm install --no-save --global @antora/collector-extension \
&& npm install --no-save --global @antora/lunr-extension \
&& npm install --no-save --global @antora/pdf-extension \
&& npm install --no-save --global @antora/site-generator \
&& npm install --no-save --global asciidoctor-emoji \
&& npm install --no-save --global asciidoctor-kroki \
&& npm install --no-save --global gulp gulp-cli gulp-connect \
&& npm install --no-save --global js-yaml \
&& npm install --no-save --global asciidoctor \
&& which antora \
&& antora --version \
&& rm /tmp/* --recursive --force
VOLUME /projects
WORKDIR /projects
# Pulling an image requires to be the podman user
#USER podman
# Pull the ccutil image (doesn't work when building on Quay)
#RUN podman pull quay.io/ivanhorvath/ccutil:amazing
# Test that binaries are available
RUN set -x \
&& antora --version \
&& asciidoctor --version \
&& bash --version \
&& curl --version \
&& git --version \
&& gulp --version \
&& htmltest --version \
&& jq --version \
&& pip3 freeze \
&& vale --version \
&& yq --version