From a0ac28973c92c48109edae22b5772273f087bd0e Mon Sep 17 00:00:00 2001 From: Mootor Date: Tue, 16 Apr 2024 16:44:02 -0700 Subject: [PATCH 1/6] standardize dockerfile --- Dockerfile | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 414a896..413c022 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,11 @@ -FROM blcdsdockerregistry/bl-base:1.0.0 AS builder +ARG MINIFORGE_VERSION=23.3.1-1 +ARG UBUNTU_VERSION=23.04 + +FROM condaforge/mambaforge:${MINIFORGE_VERSION} AS builder # Use conda to install tools and dependencies into /usr/local ENV VCFTOOLS_VERSION=0.1.16 -RUN conda create -qy -p /usr/local \ +RUN mamba create -qy -p /usr/local \ -c bioconda \ -c conda-forge \ vcftools==${VCFTOOLS_VERSION} \ @@ -10,7 +13,15 @@ RUN conda create -qy -p /usr/local \ tabix # Deploy the target tools into a base image -FROM ubuntu:20.04 +FROM ubuntu:${UBUNTU_VERSION} AS final COPY --from=builder /usr/local /usr/local -LABEL maintainer="Tim Sanders " \ No newline at end of file +# 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="Mohammed Faizal Eeman Mootor " \ + org.opencontainers.image.source=https://github.com/uclahs-cds/docker-VCFtools From 5b18520514cd521728c3ba02c32290bc8d7220fb Mon Sep 17 00:00:00 2001 From: Mootor Date: Tue, 16 Apr 2024 16:44:16 -0700 Subject: [PATCH 2/6] standardize metadata.yaml --- metadata.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/metadata.yaml b/metadata.yaml index ca2476a..e4221ef 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -1,10 +1,10 @@ --- -Category: 'docker' -Description: 'Docker repository for VCFtools' -Maintainers: ['tsanders@mednet.ucla.edu'] -Contributors: 'Timothy Sanders' -Languages: ['bash'] -Tools: ['VCFtools'] -Version: ['0.1.16'] -Dependencies: ['docker', 'conda', 'bl-base', 'tabix'] -References: 'https://vcftools.github.io/license.html' +category: 'docker' +description: 'Docker repository for VCFtools' +maintainers: ['mmootor@mednet.ucla.edu'] +languages: ['Dockerfile'] +tools: ['VCFtools'] +version: ['0.1.16'] +purpose: 'Package with easily accessible methods to work with VCF files' +references: 'https://vcftools.github.io/license.html' +image_name: 'vcftools' From 09d9c935d00dd741a798bffa06a9e752fba38850 Mon Sep 17 00:00:00 2001 From: Mootor Date: Tue, 16 Apr 2024 16:58:56 -0700 Subject: [PATCH 3/6] update README --- README.md | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e19e143..3f44e75 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ Repository for the VCFtools Dockerfile, a "package designed for working with VCF This Docker image contains both the C++ and Perl libraries for VCFtools. Additionally, tabix is installed in this image. -The image is located in the Boutros Lab Docker Hub repo: https://hub.docker.com/repository/docker/blcdsdockerregistry/vcftools +The image can be found in docker-VCFtools' GitHub package page: [here](https://github.com/uclahs-cds/docker-VCFtools/pkgs/container/vcftools) + +--- # Documentation VCFtools main website [here](https://vcftools.github.io/index.html) @@ -12,15 +14,46 @@ VCFtools documentation [here](https://vcftools.github.io/examples.html) GitHub repository [here](https://github.com/vcftools/vcftools) +--- + # Version | Tool | Version | |------|---------| | VCFtools | 0.1.16 | +--- + +## Discussions + +- [Issue tracker](https://github.com/uclahs-cds/docker-VCFtools/issues) to report errors and enhancement ideas. +- Discussions can take place in [docker-VCFtools Discussions](https://github.com/uclahs-cds/docker-VCFtools/discussions) +- [docker-VCFtools pull requests](https://github.com/uclahs-cds/docker-VCFtools/pulls) are also open for discussion + +--- + +## Contributors + +Please see list of [Contributors](https://github.com/uclahs-cds/docker-VCFtools/graphs/contributors) at GitHub. --- ## References 1. https://vcftools.github.io -2. https://vcftools.github.io/license.html \ No newline at end of file +2. https://vcftools.github.io/license.html + +--- + +## License + +Author: 'Timothy Sanders', 'Mohammed Faizal Eeman Mootor' + +docker-VCFtools is licensed under the GNU General Public License version 2. See the file LICENSE for the terms of the GNU GPL license. + +docker-VCFtools can be used to create a docker instance to use VCFtools. + +Copyright (C) 2021-2024 University of California Los Angeles ("Boutros Lab") All rights reserved. + +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. From 983cfae30428bbc6ef7810d372f2baec833aadf9 Mon Sep 17 00:00:00 2001 From: Mootor Date: Tue, 16 Apr 2024 17:00:53 -0700 Subject: [PATCH 4/6] add PR Template --- .github/PULL_REQUEST_TEMPLATE.md | 61 ++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..b80888a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,61 @@ +# Description + + +### Closes #... + +## Testing Results + +### Docker Image Testing + +- [ ] I have tested the Docker image with the `docker run` command as described below. + +#### Test the Docker image with at least one sample. Verify the new Docker image works using: + +```docker run -u $(id -u):$(id -g) –w -v : --rm ``` + +#### My command: + +```Provide the command you ran here``` + +### Test Cases + +- Case 1 + - sample: + - input csv: + - config: + - output: +- Case 2 + - sample: + - input csv: + - config: + - output: + +# Checklist + + +### Formatting + +- [ ] I have read the [code review guidelines](https://uclahs-cds.atlassian.net/wiki/spaces/BOUTROSLAB/pages/3187646/Code+Review+Guidelines) and the [code review best practice on GitHub check-list](https://uclahs-cds.atlassian.net/wiki/spaces/BOUTROSLAB/pages/3189956/Code+Review+Best+Practice+on+GitHub+-+Check+List). + +- [ ] The name of the branch is meaningful and well formatted following the [standards](https://uclahs-cds.atlassian.net/wiki/spaces/BOUTROSLAB/pages/3189956/Code+Review+Best+Practice+on+GitHub+-+Check+List), using \[AD_username (or 5 letters of AD if AD is too long)]-\[brief_description_of_branch]. + +- [ ] I have set up or verified the branch protection rule following the [github standards](https://uclahs-cds.atlassian.net/wiki/spaces/BOUTROSLAB/pages/3190380/GitHub+Standards#GitHubStandards-Branchprotectionrule) before opening this pull request. + +### File Updates + +- [ ] I have ensured that the version number update follows the [versioning standards](https://uclahs-cds.atlassian.net/wiki/spaces/BOUTROSLAB/pages/3188472/Docker+image+versioning+standardization). + +- [ ] I have updated the version number in the `Dockerfile`, `README.md` and `metadata.yaml` files. + +- [ ] I have updated the dependencies and added my name to the maintainer list in the `Dockerfile`. + +- [ ] I have updated the feature changes in the `README.md` (optional). + +- [ ] I have added the changes included in this pull request to the `CHANGELOG.md` under the next release version or unreleased, and updated the date. + +### GitHub Packages Auto Build Rules + +- [ ] I have not manually pushed this Docker image to the uclahs-cds container registry (`ghcr.io/uclahs-cds`) on [GitHub](https://github.com/orgs/uclahs-cds/packages). + +- [ ] **I have updated the `image_name`** in the `metadata.yaml` which is required by GitHub action to automatically build and push the image. From 126239eae8340353fd4076d0dd491a82ba5a83ed Mon Sep 17 00:00:00 2001 From: Mootor Date: Tue, 16 Apr 2024 17:05:54 -0700 Subject: [PATCH 5/6] Add docker release; update CICD --- .github/workflows/CICD-base.yaml | 2 +- .github/workflows/Docker-build-release.yaml | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/Docker-build-release.yaml diff --git a/.github/workflows/CICD-base.yaml b/.github/workflows/CICD-base.yaml index 682124b..910e0b2 100644 --- a/.github/workflows/CICD-base.yaml +++ b/.github/workflows/CICD-base.yaml @@ -21,4 +21,4 @@ jobs: # Run CICD-base - name: CICD-base - uses: docker://blcdsdockerregistry/cicd-base:latest + uses: docker://ghcr.io/uclahs-cds/cicd-base:latest 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 }} From 1fad0af4bdb2e68cba483f57b8b8cf6d80bab4f8 Mon Sep 17 00:00:00 2001 From: Mootor Date: Tue, 16 Apr 2024 17:08:42 -0700 Subject: [PATCH 6/6] Update CHANGELOG.md --- CHANGELOG.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb06be7..774e68b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,26 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm --- +## [0.1.16] - 2024-04-16 +### Added +- Add PR template to repo +- Add `Docker-build-release.yaml` to repo +- Add `bldocker` as group and user to Dockerfile +- Set `bldocker` as default user + +### Changed +- Update CICD-base docker registry to `ghcr.io/uclahs-cds` +- Standardize `README.md` +- Standardize `metadata.yaml` +- Standardize Dockerfile +- Use condaforge as builder + +### Removed +- Remove `blcdsdockerregistry/bl-base` as builder + +--- + ## [0.1.16] - 2021-05-07 ### Added - Migrated VCFtools dockerfile to its own repository -- Created CHANGELOG.md \ No newline at end of file +- Created CHANGELOG.md