forked from eclipse-che/che-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (35 loc) · 1.58 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
#
# Copyright (c) 2018 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
#
FROM ruby:2.6-alpine
COPY src/main/Gemfile* /tmp/
RUN apk add --no-cache --update libstdc++ bash ca-certificates curl python3 grep perl libxml2-dev xmlstarlet \
&& apk add --no-cache --virtual build-dependencies build-base \
&& cd /tmp \
&& time bundle install --no-cache --frozen \
&& time apk del build-dependencies build-base \
&& rm -rf /root/.bundle/cache \
&& time pip3 install newdoc --upgrade pip --no-cache-dir \
&& newdoc --version \
&& curl -sfLo /usr/bin/test-adoc.sh https://raw.githubusercontent.com/jhradilek/check-links/master/test-adoc.sh \
&& chmod +x /usr/bin/test-adoc.sh \
&& test-adoc.sh -V \
&& curl -sfLo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
&& curl -sfLo glibc-2.30-r0.apk https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-2.30-r0.apk \
&& apk add --no-cache glibc-2.30-r0.apk \
&& curl -sfLo vale.tar.gz https://github.com/errata-ai/vale/releases/download/v2.0.0/vale_2.0.0_Linux_64-bit.tar.gz \
&& tar xvzf vale.tar.gz -C /usr/bin/ \
&& rm vale.tar.gz \
&& vale -v \
&& mkdir /che-docs \
&& for f in "/che-docs"; do \
chgrp -R 0 ${f} && \
chmod -R g+rwX ${f}; \
done
WORKDIR /che-docs
CMD jekyll clean && jekyll serve --livereload -H 0.0.0.0 --trace