Skip to content

Commit

Permalink
adds docker image and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Geert van Geest committed Nov 25, 2024
1 parent 2479c52 commit 96e7ba7
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build and push CI

on:
workflow_dispatch:
push:
tags:
- 'v*.*'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
geertvangeest/cancer-variants-vscode
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{major}}.{{minor}}
# -
# name: Set up QEMU
# uses: docker/setup-qemu-action@v1
# -
# name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
push: true
context: ./Docker
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

29 changes: 29 additions & 0 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM linuxserver/code-server:4.95.3

# Install base utilities
RUN apt-get update && \
apt-get install -y wget bc tree && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Install mamba
RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
RUN bash Miniforge3-$(uname)-$(uname -m).sh -b -p /opt/miniforge3
RUN /opt/miniforge3/condabin/mamba init

# Put conda in path so we can use conda activate
ENV PATH=/opt/miniforge3/condabin/:$PATH


# intall required software with conda
COPY environment.yml ./

RUN mamba env create \
-n ngs-tools \
-f environment.yml

RUN mamba init

COPY settings.json /config/data/User/
COPY keybindings.json /config/data/User/
RUN mkdir -p /config/project
11 changes: 11 additions & 0 deletions Docker/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
channels:
- conda-forge
- bioconda
dependencies:
- python>=3.8
- samtools>=1.12
- bwa=0.7.17
- snpeff>=5.0
- gatk4=4.5
- r-base
- cnvkit
7 changes: 7 additions & 0 deletions Docker/keybindings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+enter",
"command": "workbench.action.terminal.runSelectedText"
}
]
7 changes: 7 additions & 0 deletions Docker/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"workbench.startupEditor": "none",
"extensions.ignoreRecommendations": true,
"extensions.showRecommendationsOnlyOnDemand": true,
"terminal.integrated.fontSize": 14,
"editor.fontSize": 13
}

0 comments on commit 96e7ba7

Please sign in to comment.