|
|
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/ghcr.io/realm/swiftlint:0.59.1 |
|
|
|
|
|
ENV USER=root |
|
|
ENV HOME=/root |
|
|
WORKDIR $HOME |
|
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive |
|
|
RUN cat /proc/version \ |
|
|
|
|
|
|
|
|
|
|
|
&& apt-get update \ |
|
|
&& apt-get install -y python3 python3-pip python-is-python3 npm php-cli shellcheck rubocop cppcheck clang-tidy mono-complete unzip wget curl git \ |
|
|
&& apt-get clean \ |
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
RUN pip3 install uv --break-system-packages -i https://mirrors.cloud.tencent.com/pypi/simple |
|
|
RUN uv venv |
|
|
RUN . /root/.venv/bin/activate |
|
|
RUN uv pip install ruff sqlfluff pyarrow pandas tqdm -i https://mirrors.cloud.tencent.com/pypi/simple |
|
|
RUN wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F7.14.0/pmd-dist-7.14.0-bin.zip && \ |
|
|
unzip pmd-dist-7.14.0-bin.zip -d /opt && \ |
|
|
ln -s /opt/pmd-bin-7.14.0/bin/pmd /usr/local/bin/pmd |
|
|
RUN wget https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar && \ |
|
|
chmod +x phpstan.phar && mv phpstan.phar /usr/local/bin/phpstan |
|
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ |
|
|
/root/.cargo/bin/rustup component add clippy && \ |
|
|
ln -s /root/.cargo/bin/clippy-driver /usr/local/bin/clippy-driver |
|
|
RUN wget https://go.dev/dl/go1.23.10.linux-amd64.tar.gz && \ |
|
|
tar -C /usr/local -xzf go1.23.10.linux-amd64.tar.gz && \ |
|
|
/usr/local/go/bin/go install honnef.co/go/tools/cmd/staticcheck@latest && \ |
|
|
/usr/local/go/bin/go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest && \ |
|
|
ln -s /root/go/bin/staticcheck /usr/local/bin/staticcheck && \ |
|
|
ln -s /root/go/bin/golangci-lint /usr/local/bin/golangci-lint |
|
|
RUN npm install -g eslint |
|
|
RUN apt-get update |
|
|
RUN apt-get install -y openjdk-11-jdk |
|
|
ENV PATH=/root/.venv/bin/ruff:$PATH:/root/.cargo/bin:/usr/local/go/bin |
|
|
|
|
|
RUN echo "===== 工具版本检查 =====" && \ |
|
|
python3 --version && \ |
|
|
pip3 --version && \ |
|
|
ruff --version && \ |
|
|
sqlfluff --version && \ |
|
|
cppcheck --version && \ |
|
|
clang-tidy --version && \ |
|
|
php --version && \ |
|
|
phpstan --version || true && \ |
|
|
pmd --version && \ |
|
|
rustc --version && \ |
|
|
clippy-driver --version && \ |
|
|
go version && \ |
|
|
staticcheck --version && \ |
|
|
golangci-lint --version && \ |
|
|
eslint --version && \ |
|
|
shellcheck --version && \ |
|
|
rubocop --version && \ |
|
|
mcs --version && \ |
|
|
swiftlint version |
|
|
|
|
|
ENV LANG='en_US.UTF-8' |
|
|
ENV LANGUAGE='en_US:en' |