-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (28 loc) · 1.4 KB
/
Dockerfile
File metadata and controls
34 lines (28 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# syntax=docker/dockerfile:1
# Compatibility-first template for gffcompare.
# Installs package from Bioconda and copies the full conda runtime to avoid missing libs/interpreters.
FROM mambaorg/micromamba:2.0.5-debian12-slim AS builder
RUN micromamba install -y -n base -c conda-forge -c bioconda \
gffcompare \
&& micromamba clean --all --yes
# Resolve a runnable command for this package.
# Prefer exact match, then underscore variant, then prefix match.
RUN set -eux; \
BIN=""; \
if [ -x "/opt/conda/bin/gffcompare" ]; then BIN="/opt/conda/bin/gffcompare"; fi; \
if [ -z "$BIN" ]; then CAND="/opt/conda/bin/$(echo gffcompare | tr '-' '_')"; [ -x "$CAND" ] && BIN="$CAND" || true; fi; \
if [ -z "$BIN" ]; then BIN="$(find /opt/conda/bin -maxdepth 1 -type f -perm -111 -name 'gffcompare*' | head -n1 || true)"; fi; \
test -n "$BIN"; \
printf '%s\n' "$BIN" > /tmp/tool-entry-path
FROM mambaorg/micromamba:2.0.5-debian12-slim
COPY --from=builder /opt/conda /opt/conda
COPY --from=builder /tmp/tool-entry-path /tmp/tool-entry-path
USER root
ENV PATH="/opt/conda/bin:${PATH}"
ENV LD_LIBRARY_PATH="/opt/conda/lib:/opt/conda/lib64"
RUN set -eux; \
BIN="$(cat /tmp/tool-entry-path)"; \
printf '#!/usr/bin/env bash\nexec "%s" "$@"\n' "$BIN" > /usr/local/bin/gffcompare
RUN chmod +x /usr/local/bin/gffcompare && rm -f /tmp/tool-entry-path
WORKDIR /data
ENTRYPOINT ["/usr/local/bin/gffcompare"]