container-pre-commit/Dockerfile

33 lines
1.2 KiB
Text
Raw Normal View History

FROM python:3.11.5-alpine3.17
COPY --from=koalaman/shellcheck:v0.9.0 /bin/shellcheck /bin/
2023-09-22 14:55:28 +02:00
# renovate: datasource=repology depName=alpine_3_17/build-base versioning=loose
ENV BUILD_BASE_VERSION="0.5-r3"
# renovate: datasource=repology depName=alpine_3_17/gcc versioning=loose
ENV GCC_VERSION="12.2.1_git20220924-r4"
# renovate: datasource=repology depName=alpine_3_17/ruby versioning=loose
ENV RUBY_VERSION="3.1.4-r0"
# renovate: datasource=repology depName=alpine_3_17/git versioning=loose
ENV GIT_VERSION="2.38.5-r0"
# renovate: datasource=repology depName=alpine_3_17/openssh-keygen versioning=loose
ENV OPENSSH_KEYGEN_VERSION="9.1_p1-r4"
2023-09-22 14:49:03 +02:00
# renovate: datasource=pypi depName=pre-commit versioning=pep440
ENV PRE_COMMIT_VERSION="3.3.3"
# renovate: datasource=rubygems depName=mdl versioning=ruby
2023-09-22 14:55:28 +02:00
ENV MDL_VERSION="0.11.0"
2023-09-22 14:49:03 +02:00
RUN apk add --update --no-cache \
2023-09-22 14:49:03 +02:00
build-base="${BUILD_BASE_VERSION}" \
gcc="${GCC_VERSION}" \
ruby="${RUBY_VERSION}" \
git="${GIT_VERSION}" \
openssh-keygen="${OPENSSH_KEYGEN_VERSION}" \
&& \
2023-09-22 14:49:03 +02:00
pip install --no-cache-dir pre-commit=="${PRE_COMMIT_VERSION}" && \
gem install --no-document mdl -v "${MDL_VERSION}" && \
mkdir /data && \
2023-09-21 18:40:48 +02:00
adduser -D -g user user
2023-09-21 18:40:48 +02:00
USER user:user
WORKDIR /data