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

Dockerfile.gitlab-docs-lint-markdown « dockerfiles - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6d4caa2e99fbd3de350540f6f87e87a135295461 (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
############################
#
# Image that contains the doc lint tools.
#
############################

# ALPINE_VERSION is defined in .gitlab-ci.yml
ARG ALPINE_VERSION

FROM alpine:${ALPINE_VERSION}

# VALE_VERSION and MARKDOWNLINT_VERSION are defined in .gitlab-ci.yml
ARG VALE_VERSION
ARG MARKDOWNLINT_VERSION

# Install dependencies
RUN apk add --no-cache -U \
    bash         \
    build-base   \
    curl         \
    git          \
    gnupg        \
    grep         \
    libc6-compat \
    libcurl      \
    libxslt      \
    libxslt-dev  \
    nodejs       \
    openssl      \
    pngquant     \
    tar          \
    yarn

# Install vale
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
RUN curl -sfL https://install.goreleaser.com/github.com/ValeLint/vale.sh | sh -s v${VALE_VERSION}

# Set up needed environment variables that are called with --build-arg when
# the Docker image is built (see .gitlab-ci.yml).
ARG CI_COMMIT_REF_NAME
# If CI_COMMIT_REF_NAME is not set (local development), set it to master
ENV CI_COMMIT_REF_NAME ${CI_COMMIT_REF_NAME:-master}

WORKDIR /tmp

# markdownlint-cli pinned to control when new versions are put in place.
RUN yarn global add markdownlint-cli@${MARKDOWNLINT_VERSION} && yarn cache clean