-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add DIA-NN 2.5.0 container #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| FROM ubuntu:22.04 | ||
|
|
||
| # Some metadata | ||
| LABEL base_image="ubuntu:22.04" | ||
| LABEL version="2" | ||
| LABEL software="diann" | ||
| LABEL software.version="2.5.0" | ||
| LABEL about.summary="DIA-NN - a universal software for data-independent acquisition (DIA) proteomics data processing." | ||
| LABEL about.home="https://github.com/vdemichev/DiaNN" | ||
| LABEL about.documentation="https://github.com/vdemichev/DiaNN" | ||
| LABEL about.license_file="https://github.com/vdemichev/DiaNN/LICENSE.txt" | ||
| LABEL about.tags="Proteomics" | ||
| LABEL maintainer="Yasset Perez-Riverol <ypriverol@gmail.com>" | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| # Update package lists and ensure package versions are up to date, Install necessary packages | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| wget \ | ||
| unzip \ | ||
| libgomp1 \ | ||
| locales && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Configure locale to avoid runtime errors | ||
| RUN locale-gen en_US.UTF-8 && \ | ||
| update-locale LANG=en_US.UTF-8 | ||
|
|
||
| # Set environment variables for locale | ||
| ENV LANG=en_US.UTF-8 | ||
| ENV LANGUAGE=en_US:en | ||
| ENV LC_ALL=en_US.UTF-8 | ||
|
|
||
| # Download and install DIA-NN | ||
| RUN wget --no-check-certificate https://github.com/vdemichev/DiaNN/releases/download/2.0/DIA-NN-2.5.0-Academia-Linux.zip && \ | ||
| unzip DIA-NN-2.5.0-Academia-Linux.zip -d /usr/ && \ | ||
| rm DIA-NN-2.5.0-Academia-Linux.zip | ||
|
Comment on lines
+35
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove insecure download flag and verify artifact integrity. Disabling certificate verification here is a release-blocking supply-chain risk. Keep TLS verification enabled and add checksum verification before unzip. 🔒 Proposed fix+ARG DIANN_URL="https://github.com/vdemichev/DiaNN/releases/download/2.0/DIA-NN-2.5.0-Academia-Linux.zip"
+ARG DIANN_SHA256="<official_sha256_here>"
-RUN wget --no-check-certificate https://github.com/vdemichev/DiaNN/releases/download/2.0/DIA-NN-2.5.0-Academia-Linux.zip && \
- unzip DIA-NN-2.5.0-Academia-Linux.zip -d /usr/ && \
- rm DIA-NN-2.5.0-Academia-Linux.zip
+RUN wget -O /tmp/diann.zip "$DIANN_URL" && \
+ echo "${DIANN_SHA256} /tmp/diann.zip" | sha256sum -c - && \
+ unzip /tmp/diann.zip -d /usr/ && \
+ rm /tmp/diann.zip🧰 Tools🪛 Checkov (3.2.513)[high] 35-37: Ensure that certificate validation isn't disabled with wget (CKV2_DOCKER_3) 🤖 Prompt for AI Agents |
||
|
|
||
| # Remove unnecessary packages | ||
| RUN apt-get remove -y wget unzip && apt-get autoremove -y && apt-get clean && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Set appropriate permissions for the DIA-NN folder | ||
| RUN chmod +x /usr/diann-2.5.0/diann-linux | ||
|
|
||
| # Create a symbolic link and add to PATH | ||
| RUN ln -s /usr/diann-2.5.0/diann-linux /usr/diann-2.5.0/diann | ||
| ENV PATH="$PATH:/usr/diann-2.5.0" | ||
|
|
||
| WORKDIR /data/ | ||
|
|
||
| # NOTE: It is entirely the user's responsibility to ensure compliance with DIA-NN license terms. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop root at runtime.
The container currently runs as root. Add a dedicated unprivileged user and switch to it before
WORKDIR /data/.🛡️ Proposed hardening
Also applies to: 50-50
🧰 Tools
🪛 Trivy (0.69.3)
[error] 1-1: Image user should not be 'root'
Specify at least 1 USER command in Dockerfile with non-root user as argument
Rule: DS-0002
Learn more
(IaC/Dockerfile)
🤖 Prompt for AI Agents