From 7da81aded2a59f81a90fb4e82b3a9c3e790b50ea Mon Sep 17 00:00:00 2001 From: Neilsen Date: Tue, 20 Jun 2023 14:44:49 -0700 Subject: [PATCH 1/2] Update SAMTools to v1.17 and add autobuild function --- .github/workflows/Docker-build-release.yaml | 20 ++++++++++++++++ CHANGELOG.md | 8 ++++++- Dockerfile | 26 +++++++++++++++++---- README.md | 3 ++- metadata.yaml | 7 +++--- 5 files changed, 54 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/Docker-build-release.yaml diff --git a/.github/workflows/Docker-build-release.yaml b/.github/workflows/Docker-build-release.yaml new file mode 100644 index 0000000..b2313d4 --- /dev/null +++ b/.github/workflows/Docker-build-release.yaml @@ -0,0 +1,20 @@ +--- +on: + push: + branches: ['main'] + tags: ['v*'] + release: + types: [published] + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + name: A job to build and push a docker image + permissions: + contents: read + packages: write + steps: + - id: build-push + uses: uclahs-cds/tool-Docker-action/build-release@latest + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 410a37d..5c9d7c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm --- -## [Unreleased] +## [Unreleased] - 2023-06-20 +### Changed +- Updated SAMTools to v1.17 +- Updated Dockerfile to meet new lab standards + +### Added +- Added autobuild workflow action --- ## [2.2.1] - 2021-05-22 diff --git a/Dockerfile b/Dockerfile index ea61fea..47b180b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,28 @@ -FROM blcdsdockerregistry/bl-base:1.0.0 AS builder +ARG MINIFORGE_VERSION=22.9.0-2 -RUN conda create -qy -p /usr/local \ +FROM condaforge/mambaforge:${MINIFORGE_VERSION} AS builder + +# add channels in correct order to avoid missing libcrypto dependency +# https://github.com/bioconda/bioconda-recipes/issues/12100 +ARG HISAT2_VERSION=2.2.1 +ARG SAMTOOLS_VERSION=1.17 + +RUN mamba create -qy -p /usr/local \ + -c defaults \ -c bioconda \ -c conda-forge \ - samtools==1.12 \ - hisat2==2.2.1 + hisat2==${HISAT2_VERSION} \ + samtools==${SAMTOOLS_VERSION} FROM ubuntu:20.04 COPY --from=builder /usr/local /usr/local -LABEL maintainer="Julie Livingstone " +# Add a new user/group called bldocker +RUN groupadd -g 500001 bldocker && \ + useradd -r -u 500001 -g bldocker bldocker + +# Change the default user to bldocker from root +USER bldocker + +LABEL maintainer="Beth Neilsen " \ +org.opencontainers.image.source=https://github.com/uclahs-cds/docker-HISAT2 diff --git a/README.md b/README.md index e04c330..1b394db 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Dockerfile for HISAT2, which "is a fast and sensitive alignment program for mapp SAMtools is also installed for use in the align-RNA and align-DNA pipelines. This is because many aligners (e.g. BWA-MEM2 and HISAT2) only support outputting the uncompressed SAM, which causes a burden on the hard disk IO and limits the performace. -The HISAT2 image with SAMtools is located in the Boutros Lab Docker Hub repo: https://hub.docker.com/repository/docker/blcdsdockerregistry/hisat2_samtools-1.12 +The HISAT2 image with SAMtools is located in the Boutros Lab Docker Hub repo: https://github.com/uclahs-cds/docker-HISAT2 # Documentation HISAT2 manual is [here](http://daehwankimlab.github.io/hisat2/manual/) @@ -13,6 +13,7 @@ HISAT2 manual is [here](http://daehwankimlab.github.io/hisat2/manual/) | Tool | Version | |------|---------| | HISAT2 | 2.2.1 | +| SAMTools| 1.17 | --- diff --git a/metadata.yaml b/metadata.yaml index 1b9333a..09a792d 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -1,11 +1,12 @@ --- Category: 'docker' Description: 'Docker repository for the HISAT2 algorithm' -Maintainers: ['JLivingstone@mednet.ucla.edu'] -Contributors: ['Julie Livingstone'] +Maintainers: ['BNeilsen@mednet.ucla.edu'] +Contributors: ['Julie Livingstone', 'Beth Neilsen'] Languages: ['Docker', 'bash'] -Tools: ['HISAT2', 'SAMtools v1.12'] +Tools: ['HISAT2', 'SAMtools v1.17'] Version: ['2.2.1'] Purpose of tool: 'Algorithm for aligning RNA-Seq data' Dependencies: ['Docker'] References: 'Kim et al, Nature Biotechnology 37 907-915 (2019)' +image_name: 'hisat2' From ca91c700eada0f12f03822c32364ac1a4642748d Mon Sep 17 00:00:00 2001 From: Neilsen Date: Wed, 12 Jul 2023 14:10:09 -0700 Subject: [PATCH 2/2] Update README.md for image location, update Miniforge to latest v23.1.0-3, update changelog to use new release tag v2.2.1_samtools-v1.17 --- CHANGELOG.md | 5 ++++- Dockerfile | 2 +- README.md | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c9d7c6..ed1c172 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm --- -## [Unreleased] - 2023-06-20 +## [Unreleased] + +## [2.2.1_samtools-1.17] - 2023-07-12 ### Changed +- Updated miniforge to v23.1.0-3 - Updated SAMTools to v1.17 - Updated Dockerfile to meet new lab standards diff --git a/Dockerfile b/Dockerfile index 47b180b..16d02f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG MINIFORGE_VERSION=22.9.0-2 +ARG MINIFORGE_VERSION=23.1.0-3 FROM condaforge/mambaforge:${MINIFORGE_VERSION} AS builder diff --git a/README.md b/README.md index 1b394db..d1bf2c3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Dockerfile for HISAT2, which "is a fast and sensitive alignment program for mapp SAMtools is also installed for use in the align-RNA and align-DNA pipelines. This is because many aligners (e.g. BWA-MEM2 and HISAT2) only support outputting the uncompressed SAM, which causes a burden on the hard disk IO and limits the performace. -The HISAT2 image with SAMtools is located in the Boutros Lab Docker Hub repo: https://github.com/uclahs-cds/docker-HISAT2 +The HISAT2 image with SAMtools is located in UCLAHS-CDS GitHub Packages: https://github.com/orgs/uclahs-cds/packages/container/package/hisat2. # Documentation HISAT2 manual is [here](http://daehwankimlab.github.io/hisat2/manual/)