From f5885dd96e72ce462a68ebb73e5bedef072338a8 Mon Sep 17 00:00:00 2001 From: Shu Muto Date: Thu, 25 Jul 2019 16:31:51 +0900 Subject: [PATCH] Re-install git in development container and suppress download from `golangci-lint` (#4113) husky-3.0 requires git>=2.13.2, but golang:1.12 container image based on devian 9 (stretch) does not satisfy the requirement. So re-install specified version of git from source code. Also, added setting `modules-download-mode: readonly` in `.golangci.yml` to suppress download in running `golangci-lint`. --- .golangci.yml | 1 + aio/develop/Dockerfile | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index c026cb8370b0..6268670f7550 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,6 +5,7 @@ run: deadline: 30m issues-exit-code: 1 tests: true + modules-download-mode: readonly linters: disable-all: true enable: diff --git a/aio/develop/Dockerfile b/aio/develop/Dockerfile index 936234d75595..21e3b40d9d3a 100644 --- a/aio/develop/Dockerfile +++ b/aio/develop/Dockerfile @@ -34,9 +34,22 @@ RUN curl -sL https://deb.nodesource.com/setup_11.x | bash - \ gosu \ nano \ less \ + unzip \ + libssl-dev \ + libghc-zlib-dev \ + libcurl4-gnutls-dev \ + libexpat1-dev \ + gettext \ && rm -rf /var/lib/apt/lists/* \ && apt-get clean +# Re-install git +# NOTE(shu-muto): husky-3.x requires git>=2.13.2 but golang:1.12 image based on debian 9 (stretch) +# does not satisfy the requirement. Its git version is 2.11.0. +# So re-install specified version of git from source code. +RUN GIT_VERSION=2.22.0 && apt-get remove -y git && cd /tmp && rm -fr git* && wget https://github.com/git/git/archive/v${GIT_VERSION}.zip -O git.zip && unzip git.zip && mv git-${GIT_VERSION} git && cd git && make prefix=/usr all && make prefix=/usr install +ENV GIT_EDITOR=nano + # Install dependencies. This will take a while. RUN npm install -g npm@latest gulp@4.0.2 @angular/cli@8.0.3 ngx-i18nsupport