diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2020-01-29 17:27:48 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2020-01-31 10:04:18 +0300 |
commit | 5bab10ec1fd21822e11d99668d6a8e535ea69977 (patch) | |
tree | f1e2617f7f8c69f284154dd873e4d83fd12441f1 | |
parent | 8c375387971976ac7e82cc2f661e21f154bb31df (diff) |
Add the Vale binary to our lint image
-rw-r--r-- | dockerfiles/Dockerfile.gitlab-docs-lint | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dockerfiles/Dockerfile.gitlab-docs-lint b/dockerfiles/Dockerfile.gitlab-docs-lint index 032482649..2095a7a57 100644 --- a/dockerfiles/Dockerfile.gitlab-docs-lint +++ b/dockerfiles/Dockerfile.gitlab-docs-lint @@ -1,9 +1,25 @@ +############################ # # Image the contains the dependencies to run the lints. # It downloads the gitlab-docs repository based on the # branch the Docker image is invoked from. # Based on Alpine. # +############################ + +# Install vale +# We need to build it from source, see https://github.com/errata-ai/vale/issues/128 +FROM golang:alpine AS builder + +ENV VALE_VERSION=1.7.1 + +RUN apk add --no-cache wget zip tar make && \ + wget https://github.com/errata-ai/vale/archive/v${VALE_VERSION}.tar.gz && \ + tar -xvzf v${VALE_VERSION}.tar.gz && \ + cd vale-${VALE_VERSION} && \ + make && \ + mv bin/vale /vale + FROM registry.gitlab.com/gitlab-org/gitlab-docs:base MAINTAINER GitLab Documentation Team @@ -24,3 +40,5 @@ RUN wget https://gitlab.com/gitlab-org/gitlab-docs/-/archive/$CI_COMMIT_REF_NAME RUN cd gitlab-docs \ && NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle install --jobs 4 + +COPY --from=builder /vale /usr/local/bin/vale |