Skip to content

Commit

Permalink
Merge pull request #1 from wegift/add-go
Browse files Browse the repository at this point in the history
Add Go to the image
  • Loading branch information
wjdp authored May 20, 2022
2 parents 1a20013 + 600872f commit acde7cb
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 acde7cb

Please sign in to comment.