From 29ff69eea372343645ecda6c02bc9d6be69a3a59 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Fri, 13 Aug 2021 18:37:27 -0700 Subject: [PATCH] Dockerfile for minimal container I've been maintaining minimal (<50 MB) Docker containers for Minimap2 here: * **Dockerfile:** https://github.com/Niema-Docker/minimap2/blob/main/Dockerfile * **Container:** https://hub.docker.com/r/niemasd/minimap2 It might be good to have a DockerHub repo linked directly to this GitHub repo so an "official" Docker container gets automatically generated when you make new releases. This Dockerfile I've provided has the version number hardcoded, but if you wanted a Dockerfile that always pulls the most recent image, you could replace the following: ```bash wget -qO- "https://github.com/lh3/minimap2/archive/refs/tags/v2.22.tar.gz" | tar -zx ``` with the following: ```bash wget -qO- https://github.com/lh3/minimap2/archive/refs/tags/$(wget -qO- "https://api.github.com/repos/lh3/minimap2/releases/latest" | grep '"tag_name": "' | cut -d'"' -f4).tar.gz | tar -zx ``` --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..0869bf45 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# Minimal Docker image for Minimap2 using Alpine base +FROM alpine:3.13.5 +MAINTAINER Niema Moshiri + +# install Minimap2 +RUN apk update && \ + apk add bash gcc make musl-dev zlib-dev && \ + wget -qO- "https://github.com/lh3/minimap2/archive/refs/tags/v2.22.tar.gz" | tar -zx && \ + cd minimap2-* && \ + make && \ + chmod a+x minimap2 && \ + mv minimap2 /usr/local/bin/minimap2 && \ + cd .. && \ + rm -rf minimap2-*