Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab-docs-lint-markdown.Dockerfile « dockerfiles - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a3fed56d7a0284b63b3d0dca3df1807070bd7eab (plain)
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
# GitLab Docs linting (Markdown) Docker image
#
# Value for ALPINE_VERSION is defined in .gitlab-ci.yml
ARG ALPINE_VERSION

FROM alpine:${ALPINE_VERSION}

# Values for VALE_VERSION, MARKDOWNLINT_VERSION, and MARKDOWNLINT2_VERSION are defined in .gitlab-ci.yml
ARG VALE_VERSION
ARG MARKDOWNLINT_VERSION
ARG MARKDOWNLINT2_VERSION

# Install dependencies
RUN printf "\n\e[32mINFO: Installing dependencies..\e[39m\n" && apk add --no-cache \
    bash         \
    build-base   \
    curl         \
    git          \
    gnupg        \
    grep         \
    libc6-compat \
    libcurl      \
    libxslt      \
    libxslt-dev  \
    nodejs       \
    openssl      \
    pngquant     \
    tar          \
    yarn         \
    && printf "\n\e[32mINFO: Dependency versions:\e[39m\n" \
    && echo "Node.js: $(node --version)" \
    && echo "Yarn: $(yarn --version)" \
    && printf "\n"

# Install Vale
RUN printf "\n\e[32mINFO: Installing Vale %s..\e[39m\n" "${VALE_VERSION}" \
  && wget --quiet https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz \
  && tar -xvzf vale_${VALE_VERSION}_Linux_64-bit.tar.gz -C bin \
  && echo "Vale: $(vale --version)" \
  && printf "\n"

# Install markdownlint-cli
RUN printf "\n\e[32mINFO: Installing markdownlint-cli %s..\e[39m\n" "${MARKDOWNLINT_VERSION}" \
  && yarn global add markdownlint-cli@${MARKDOWNLINT_VERSION} && yarn cache clean \
  && echo "markdownlint-cli: $(markdownlint --version)" \
  && printf "\n"

# Install markdownlint-cli2
RUN printf "\n\e[32mINFO: Installing markdownlint-cli2 %s..\e[39m\n" "${MARKDOWNLINT2_VERSION}" \
  && yarn global add markdownlint-cli2@${MARKDOWNLINT2_VERSION} && yarn cache clean \
  && markdownlint-cli2 | head -n 1 \
  && printf "\n"