Skip to content

Commit

Permalink
Add Go to the image
Browse files Browse the repository at this point in the history
So we can use go tooling such as gitleaks
  • Loading branch information
wjdp committed May 20, 2022
1 parent 1a20013 commit 600872f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 600872f

Please sign in to comment.