Skip to content

Commit

Permalink
Added scripts for creating docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
heseber committed Jun 3, 2024
1 parent 8128dab commit 75613b3
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 2 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1

# Use the .NET SDK as the base image for building the application
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS runtime

# Set the working directory inside the container
WORKDIR /app
# the app/ folder contains the unzipped release files
COPY app/ /app

RUN echo '#!/bin/bash\ndotnet /app/Nirvana.dll "$@"' > /usr/bin/Nirvana && chmod +x /usr/bin/Nirvana
RUN echo '#!/bin/bash\ndotnet /app/Annotator.dll "$@"' > /usr/bin/Annotator && chmod +x /usr/bin/Annotator
RUN echo '#!/bin/bash\ndotnet /app/Downloader.dll "$@"' > /usr/bin/Downloader && chmod +x /usr/bin/Downloader
RUN echo '#!/bin/bash\ndotnet /app/Jasix.dll "$@"' > /usr/bin/Jasix && chmod +x /usr/bin/Jasix
RUN echo '#!/bin/bash\ndotnet /app/SAUtils.dll "$@"' > /usr/bin/SAUtils && chmod +x /usr/bin/SAUtils
RUN echo '#!/bin/bash\ndotnet /app/Jist.dll "$@"' > /usr/bin/Jist && chmod +x /usr/bin/Jist
42 changes: 42 additions & 0 deletions create_docker_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash
set -e

########## Help function #############
PrintHelp(){
echo "USAGE: ./create_docker_image.sh [path to zip file] [image tag]"
echo " ./create_docker_image.sh ~/Download/IlluminaConnectedAnnotations-3.22.0-0-gc13dcb61-net6.0.zip 3.22.0"
}
#######################################
Clean(){
echo "Cleaning code and build directories"
rm -rf app
}
#######################################
BuildDocker(){
echo "Start building Illumina Connected Annotations docker...."
docker build -t $1:$2 .
echo "Building docker image for $1 finished!"
}
#######################################
TestDocker(){
echo "Test $1 docker"
docker run --rm $1:$2 Annotator --version
echo "Test finished"
}
#######################################

############ Checking arguments ########
if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then
PrintHelp
exit
fi

FILE_PATH=$1
TAG=$2
IMAGE_NAME=illumina-connected-annotations

Clean
unzip $FILE_PATH -d app
BuildDocker $IMAGE_NAME $TAG
TestDocker $IMAGE_NAME $TAG
Clean
2 changes: 1 addition & 1 deletion icaparser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
split_multi_sample_json_file, # noqa: F401
)

__version__ = "0.2.9"
__version__ = "0.2.10"
__author__ = "Henrik Seidel"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setuptools.setup(
name="icaparser",
version="0.2.9",
version="0.2.10",
url="https://github.com/Bayer-Group/ica-parser",
author="Henrik Seidel",
author_email="[email protected]",
Expand Down

0 comments on commit 75613b3

Please sign in to comment.