ClickHouse/docker/test/style/Dockerfile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.5 KiB
Docker
Raw Normal View History

2021-09-06 11:33:39 +00:00
# docker build -t clickhouse/style-test .
2023-08-16 21:47:46 +00:00
FROM ubuntu:22.04
2022-11-07 12:19:40 +00:00
ARG ACT_VERSION=0.2.33
ARG ACTIONLINT_VERSION=1.6.22
2020-08-14 13:09:23 +00:00
# ARG for quick switch to a given ubuntu mirror
ARG apt_archive="http://archive.ubuntu.com"
RUN sed -i "s|http://archive.ubuntu.com|$apt_archive|g" /etc/apt/sources.list
RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes \
2022-06-09 09:01:25 +00:00
aspell \
curl \
git \
2023-03-20 17:30:20 +00:00
file \
libxml2-utils \
2022-02-03 13:06:21 +00:00
moreutils \
python3-fuzzywuzzy \
python3-pip \
shellcheck \
yamllint \
2023-07-30 03:20:51 +00:00
locales \
&& pip3 install black==23.1.0 boto3 codespell==2.2.1 mypy==1.3.0 PyGithub unidiff pylint==2.6.2 \
&& apt-get clean \
2023-07-30 03:20:51 +00:00
&& rm -rf /root/.cache/pip
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen en_US.UTF-8
ENV LC_ALL en_US.UTF-8
2020-08-14 13:09:23 +00:00
# Architecture of the image when BuildKit/buildx is used
ARG TARGETARCH
# Get act and actionlint from releases
RUN arch=${TARGETARCH:-amd64} \
&& case $arch in \
amd64) act_arch=x86_64 ;; \
arm64) act_arch=$arch ;; \
esac \
&& curl -o /tmp/act.tgz -L \
"https://github.com/nektos/act/releases/download/v${ACT_VERSION}/act_Linux_${act_arch}.tar.gz" \
&& tar xf /tmp/act.tgz -C /usr/bin act \
&& rm /tmp/act.tgz \
&& curl -o /tmp/actiolint.zip -L \
"https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_${arch}.tar.gz" \
&& tar xf /tmp/actiolint.zip -C /usr/bin actionlint \
&& rm /tmp/actiolint.zip
2021-02-26 11:43:58 +00:00
COPY run.sh /
COPY process_style_check_result.py /
CMD ["/bin/bash", "/run.sh"]