forked from linaro-its/jekyll-build-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
173 lines (154 loc) · 5.01 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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# Core tools for building Linaro's static web sites.
# Set the base image to Ubuntu (version 20.04).
# Uses the new "ubuntu-minimal" image.
FROM ubuntu:20.04
LABEL maintainer="[email protected]"
################################################################################
# Install locale packages from Ubuntu repositories and set locale.
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get clean -y && \
apt-get update && \
apt-get install apt-utils -y && \
apt-get upgrade -y && \
apt-get install -y language-pack-en && \
locale-gen en_US.UTF-8 && \
dpkg-reconfigure locales && \
apt-get --purge autoremove -y && \
apt-get clean -y \
&& \
rm -rf \
/tmp/* \
/var/cache/* \
/var/lib/apt/lists/* \
/var/log/*
# Set the defaults
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
################################################################################
# Install unversioned dependency packages from Ubuntu repositories.
# See also: https://jekyllrb.com/docs/installation/.
ENV UNVERSIONED_DEPENDENCY_PACKAGES \
# Needed by the build-site script to determine if this is the latest container.
curl \
jq \
# Needed by the build-site script to copy stuff and retrieve repos.
rsync \
git \
# Jekyll prerequisites, except Ruby. https://jekyllrb.com/docs/installation/
# The default Java Runtime Env - dependency of Google's Closure Compiler
default-jre \
build-essential \
# Required for callback plugin.
zlib1g-dev \
# rmagick requires MagickWand libraries.
libmagickwand-dev \
# Required when building webp images.
imagemagick \
webp \
# Required when building nokogiri.
autoconf \
# Required by autofixer-rails.
nodejs
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
${UNVERSIONED_DEPENDENCY_PACKAGES} \
&& \
apt-get --purge autoremove -y && \
apt-get clean -y \
&& \
rm -rf \
/tmp/* \
/var/cache/* \
/var/lib/apt/lists/* \
/var/log/*
################################################################################
# Install versioned dependency packages from Ubuntu repositories.
# This is the last layer which will update Ubuntu packages.
ENV VERSIONED_PACKAGES \
ruby-dev
LABEL org.linaro.versioned=${VERSIONED_PACKAGES}
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
${VERSIONED_PACKAGES} \
&& \
apt-get --purge autoremove -y && \
apt-get clean -y \
&& \
rm -rf \
/tmp/* \
/var/cache/* \
/var/lib/apt/lists/* \
/var/log/*
################################################################################
# Install the gems required across all static web sites built by Linaro.
# Note that jumbo-jekyll-theme specifies the version of Jekyll it uses which is
# why we don't explicitly install Jekyll.
#
# We use gem install rather than a mega-Gemfile because Gemfiles only allow you
# to have one version of each gem specified.
ENV RUBY_GEMS \
# Required for "bundle exec"
bundler:1.17.2 \
# Newer version to ensure later gem installation
rake:12.3.2 \
#
# Gems required across the web sites. Please comment to ensure everyone knows
# which gem is used by which web site. If you are removing a web site as a user
# of a gem and it is the last site using that gem, please remove the gem!
#
# Used by 96boards.ai, 96boards.org, connect.linaro.org, devicetree.org, linaro.cloud, linaro.org,
# lkft.linaro.org, mlplatform.org, op-tee.org, trustedfirmware.org
jekyll-data:1.0.0 \
# Used by connect.linaro.org, linaro.cloud
jekyll-include-cache:0.2.0 \
# Used by devicetree.org
jekyll-minimagick:0.0.4 \
# Jekyll static site builder
jekyll:3.8.7 \
jekyll:4.0.1 \
# Used by 96boards.org
jekyll-relative-links:0.6.0 \
jekyll-relative-links:0.6.1 \
# Used by connect.linaro.org, linaro.cloud
jekyll-responsive-image:1.5.2 \
# Used by 96boards.org
jekyll-toc:0.15.0 \
jekyll-readme-index:0.3.0 \
# Used by devicetree.org, op-tee.org
mini_magick:4.9.3 \
# Used by connect.linaro.org, linaro.cloud, linaro.org
nokogiri:1.10.4 \
# Used by (staging.)lkft.linaro.org
seriously_simple_static_starter:0.7.0 \
# linaro-jekyll-theme latest versions
linaro-jekyll-theme:4.3.3 \
linaro-jekyll-theme:4.3.0 \
linaro-jekyll-theme:4.2.0 \
linaro-jekyll-theme:4.1.6 \
linaro-jekyll-theme:4.1.5 \
linaro-jekyll-theme:4.1.4 \
linaro-jekyll-theme:4.1.3 \
linaro-jekyll-theme:4.1.2 \
closure-compiler \
# Staged for removal (ensures builds pass)
jumbo-jekyll-theme:6.0.2.1 \
jumbo-jekyll-theme:5.6.9.2
LABEL org.linaro.gems=${RUBY_GEMS}
RUN gem install --no-document \
${RUBY_GEMS}
################################################################################
# Install Linaro ITS build script.
COPY build-site.sh /usr/local/bin/
RUN chmod a+rx /usr/local/bin/build-site.sh
################################################################################
# Record the Bamboo build job (if specified as an argument)
ARG bamboo_build
ENV BAMBOO_BUILD=${bamboo_build}
WORKDIR /srv
EXPOSE 4000
ENTRYPOINT ["/usr/local/bin/build-site.sh"]
CMD []