-
Notifications
You must be signed in to change notification settings - Fork 4
/
build-image.sh
executable file
·26 lines (20 loc) · 1013 Bytes
/
build-image.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
#!/bin/zsh
BASE=$(dirname $(realpath $0))
REPONAME=esmfold-docker-image
# assert CWD basename is $REPONAME
if [[ $(basename $BASE) != $REPONAME ]]; then
echo "Please run this script from the root of the repository."
exit 1
fi
# ------------------------------------------------------------------------------
# Uncomment any of the following lines to
# build the image with a specific use case
# ------------------------------------------------------------------------------
# # build image, add non-root user
# docker build --no-cache -t $USER/esmfold:nonroot-devel -f Dockerfiles/Dockerfile.nonroot .
# # build runtime image, add non-root user
# docker build --no-cache -t $USER/esmfold:nonroot-runtime -f Dockerfiles/Dockerfile.nonroot.runtime .
# build image, root user only
docker build --no-cache -t $USER/esmfold:root-devel -f Dockerfiles/Dockerfile.root .
# # build runtime image, root user only
# docker build --no-cache -t $USER/esmfold:root-runtime -f Dockerfiles/Dockerfile.root.runtime .