Sign inSign up

albicans2021/hisat2

By albicans2021

Updated about 1 year ago

Base image: debian:stable-slim, including HISAT2 version 2.1.0

Image
0

191

albicans2021/hisat2 repository overview

Dockerfile

Dockerfile v1.5

FROM debian:stable-slim

LABEL maintainer="albicans" \
      org.opencontainers.image.title="albicans2021/hisat2" \
      org.opencontainers.image.version="1.5" \
      org.opencontainers.image.description="HISAT2 2.1.0 on Debian stable-slim" \
      org.opencontainers.image.source="https://daehwankimlab.github.io/hisat2/"

# タイムゾーンは ENV のみ
ENV TZ=Asia/Tokyo

ARG DEBIAN_FRONTEND=noninteractive
ARG HISAT2_VERSION=2.1.0
# 提示いただいた公式 SHA256
ARG HISAT2_SHA256=7f68df59db7db93b8a4710d934d75577ac9138ecccc2a8b26d700925354c09bc
# 一次URLとフォールバックURL
ARG HISAT2_URL="https://cloud.biohpc.swmed.edu/index.php/s/hisat2-210-Linux_x86_64/download"
ARG HISAT2_URL_MIRROR1="http://ccb.jhu.edu/software/hisat2/dl/hisat2-2.1.0-Linux_x86_64.zip"

# ダウンロードと検証に必要な最小限
RUN apt-get update \
 && apt-get install -y --no-install-recommends ca-certificates curl unzip \
 && rm -rf /var/lib/apt/lists/*

# 上流からダウンロード → SHA256検証 → 展開 → 実行権付与 → PATHへリンク
RUN set -eux; \
  tmp=/tmp/hisat2.zip; \
  urls="${HISAT2_URL} ${HISAT2_URL_MIRROR1}"; \
  for u in $urls; do \
    echo "Trying $u"; \
    if curl -fL --retry 3 --retry-delay 2 -o "$tmp" "$u"; then break; fi; \
  done; \
  test -s "$tmp"; \
  echo "${HISAT2_SHA256}  $tmp" | sha256sum -c -; \
  unzip -q "$tmp" -d /opt; \
  rm -f "$tmp"; \
  HISAT_DIR="$(find /opt -maxdepth 1 -type d -name 'hisat2*' | head -n1)"; \
  test -n "$HISAT_DIR"; \
  mv "$HISAT_DIR" /opt/hisat2; \
  chmod +x /opt/hisat2/hisat2 /opt/hisat2/hisat2-* /opt/hisat2/*.py; \
  ln -s /opt/hisat2/hisat2 /usr/local/bin/hisat2; \
  for f in /opt/hisat2/hisat2-*; do ln -s "$f" "/usr/local/bin/$(basename "$f")"; done

ENV PATH="/usr/local/bin:${PATH}"

# 非rootユーザー
RUN groupadd -g 1000 main && useradd -m -s /bin/bash -u 1000 -g 1000 main
USER main
WORKDIR /home/main

# 動作確認(任意)
CMD ["hisat2", "--version"]

Dockerfile old

From python:3.9-slim-buster

LABEL "maintainer"="albicans" "image name"="albicans2021/hisat2" "version"="1.3"

RUN apt-get update && apt-get install -y  --no-install-recommends unzip \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata \
    && ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

# HISAT2のコピー
COPY ./tools/hisat2-2.1.0-Linux_x86_64.zip /usr/local
RUN unzip /usr/local/hisat2-2.1.0-Linux_x86_64.zip -d /usr/local && rm /usr/local/hisat2-2.1.0-Linux_x86_64.zip
RUN chmod +x /usr/local/hisat2-2.1.0/hisat2

ENV PATH $PATH:/usr/local/hisat2-2.1.0

# ユーザー作成
RUN groupadd -g 1000 main && useradd -m -s /bin/bash -u 1000 -g 1000 main

USER main
WORKDIR /home/main

Tag summary

Content type

Image

Digest

sha256:1300f3d13

Size

61 MB

Last updated

about 1 year ago

docker pull albicans2021/hisat2:1.5