diff --git a/Dockerfile b/Dockerfile index 9992f0f..e78477e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,14 +5,16 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG NODE_VERSION=16.14.0 ARG PRE_COMMIT_VERSION=v2.17.0 +ARG GO_VERSION=1.18.2 # Install nodejs, pre-commit and make cache directory RUN (curl -sL https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz | tar -xz --strip-components=1 -C /usr/) \ && npm -g update \ && npm cache clean --force \ && pip install --no-cache-dir pre-commit==${PRE_COMMIT_VERSION} \ - && mkdir -p /pre-commit-cache + && mkdir -p /pre-commit-cache \ + && curl -sL https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz | tar -xz -C /usr/local/ -ENV PRE_COMMIT_HOME=/pre-commit-cache +ENV PATH="/usr/local/go/bin:${PATH}" PRE_COMMIT_HOME=/pre-commit-cache # Make a test directory and set default command to run pre-commit on it RUN mkdir /test