Skip to content

Commit

Permalink
Merge pull request #47 from elixir-cloud-aai/improve-local-build
Browse files Browse the repository at this point in the history
Make a bit better the scripts
  • Loading branch information
trispera authored Dec 14, 2023
2 parents 19a414a + 51bf82f commit 822e46c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
33 changes: 27 additions & 6 deletions scripts/dockerBuild
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@


#
#!/bin/bash
#
# Usage:
#
#
# buildDockerImage filer or
# buildDockerImage taskmaster
#
#

IMAGE=$1

if [ -z "$IMAGE" ];
then
echo "Use: $0 <filer/taskmaster> [tag]"
exit 12
fi

TAG=$2

if [ -z "$TAG" ];
then
TAG=testing
fi

docker build -t "eu.gcr.io/tes-wes/$1:testing" -f "containers/$1.Dockerfile" .
if command -V buildah;
then
buildah bud -t "docker.io/elixircloud/tesk-core-$IMAGE:$TAG" \
--format=docker --no-cache \
-f "containers/$IMAGE.Dockerfile"
else
docker build -t "docker.io/elixircloud/tesk-core-$1:$TAG" -f "containers/$1.Dockerfile" .
fi
11 changes: 5 additions & 6 deletions scripts/dockerRun
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@

#
#!/bin/bash
#
# Usage:
#
#
# buildRun filer or
# buildRun taskmaster
#
#

imageName="$1"
shift

docker run "eu.gcr.io/tes-wes/$imageName:testing" "$@"

docker run "docker.io/elixircloud/tesk-core-$imageName:testing" "$@"

0 comments on commit 822e46c

Please sign in to comment.