container-pre-commit/Dockerfile
Sven Seeberg 2ee0cbf0a3
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Install gitleaks binary from github releases
2024-06-19 10:02:29 +02:00

36 lines
1.7 KiB
Docker

FROM python:3.12.3-alpine3.20@sha256:32385e61c3414ffa5a6dbf52feace89f758ad68709a48d376d56a0232162665a
COPY --from=koalaman/shellcheck:v0.10.0@sha256:2097951f02e735b613f4a34de20c40f937a6c8f18ecb170612c88c34517221fb /bin/shellcheck /bin/
# renovate: datasource=repology depName=alpine_3_20/build-base versioning=loose
ENV BUILD_BASE_VERSION="0.5-r3"
# renovate: datasource=repology depName=alpine_3_20/gcc versioning=loose
ENV GCC_VERSION="13.2.1_git20240309-r0"
# renovate: datasource=repology depName=alpine_3_20/ruby versioning=loose
ENV RUBY_VERSION="3.3.1-r0"
# renovate: datasource=repology depName=alpine_3_20/git versioning=loose
ENV GIT_VERSION="2.45.2-r0"
# renovate: datasource=repology depName=alpine_3_20/openssh-keygen versioning=loose
ENV OPENSSH_KEYGEN_VERSION="9.7_p1-r3"
# renovate: datasource=pypi depName=pre-commit versioning=pep440
ENV PRE_COMMIT_VERSION="3.7.1"
# renovate: datasource=rubygems depName=mdl versioning=ruby
ENV MDL_VERSION="0.13.0"
# renovate: datasource=repology depName=gitleaks versioning=loose
ENV GITLEAKS_VERSION="v8.18.4"
RUN apk add --update --no-cache \
build-base="${BUILD_BASE_VERSION}" \
gcc="${GCC_VERSION}" \
ruby="${RUBY_VERSION}" \
ruby-dev="${RUBY_VERSION}" \
git="${GIT_VERSION}" \
openssh-keygen="${OPENSSH_KEYGEN_VERSION}" \
&& \
pip install --no-cache-dir pre-commit=="${PRE_COMMIT_VERSION}" && \
gem install --no-document mdl -v "${MDL_VERSION}" && \
mkdir /data && \
git config --global --add safe.directory /data && \
wget https://github.com/gitleaks/gitleaks/releases/download/${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz && \
tar xf gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz && cp gitleaks /usr/bin/
WORKDIR /data