generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build_docker.sh
executable file
·40 lines (37 loc) · 1.41 KB
/
build_docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
#
# Title: build_docker.sh
# Description: This script builds docker images with and without references included
# Usage: ./build_docker.sh [with_references|without_references] [testing]
# Date Created: 2023-12-19 16:34
# Last Modified: Tue 19 Dec 2023 05:05:55 PM EST
# Author: Reagan Kelly ([email protected])
#
if [[ ${1} == "without_references" ]]; then
if [[ ${2} == "testing" ]]; then
TAG=testing
else
TAG=latest
fi
echo "Building docker image without references as $TAG"
DOCKER_BUILDKIT=1 docker build -t ghcr.io/cdcgov/varpipe_wgs_without_refs:$TAG -f Dockerfile.without_refs .
elif [[ ${1} == "with_references" ]]; then
if [[ ${2} == "testing" ]]; then
TAG=testing
else
TAG=latest
fi
echo "Building docker image with references as $TAG"
DOCKER_BUILDKIT=1 docker build -t ghcr.io/cdcgov/varpipe_wgs_with_refs:$TAG -f Dockerfile.with_refs .
else
if [[ ${1} == "testing" ]]; then
TAG=testing
else
TAG=latest
fi
echo "Building docker images with & without references as $TAG"
echo "Building docker image without references as $TAG"
DOCKER_BUILDKIT=1 docker build -t ghcr.io/cdcgov/varpipe_wgs_without_refs:$TAG -f Dockerfile.without_refs .
echo "Building docker image with references as $TAG"
DOCKER_BUILDKIT=1 docker build -t ghcr.io/cdcgov/varpipe_wgs_with_refs:$TAG -f Dockerfile.with_refs .
fi