Skip to content

Commit

Permalink
[infra] Update docker build default setting (Samsung#11728)
Browse files Browse the repository at this point in the history
This commit updates docker build command
- Default ubuntu codename: bionic -> focal
- Remove reduntant variable: DOCKER_TAG
- Update help message

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh authored Oct 18, 2023
1 parent ab89e37 commit b5cef18
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions infra/command/build-docker-image
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ function Usage()
echo "Usage: $0 $(basename ${BASH_SOURCE[0]}) [OPTIONS]"
echo ""
echo "Options:"
echo " --codename ubuntu codename, default image name is nnfw/one-devtools:[codename]"
echo " --codename ubuntu codename, default: ${UBUNTU_CODENAME}"
echo " default image name is nnfw/one-devtools:[codename]"
echo "Options can use as docker build option:"
docker build --help
}
Expand All @@ -14,8 +15,7 @@ DOCKER_FILE_RPATH_BASE="infra/docker"
DOCKER_BUILD_ARGS=()

# Default setting
UBUNTU_CODENAME="bionic"
DOCKER_TAG="latest"
UBUNTU_CODENAME="focal"

while [[ $# -gt 0 ]]
do
Expand All @@ -29,7 +29,6 @@ do
;;
--codename)
UBUNTU_CODENAME=$2
DOCKER_TAG=$2
shift 2
;;
-t|--tag)
Expand All @@ -43,7 +42,7 @@ do
esac
done

DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME:-nnfw/one-devtools:$DOCKER_TAG}
DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME:-nnfw/one-devtools:$UBUNTU_CODENAME}
DOCKER_FILE_RPATH=$DOCKER_FILE_RPATH_BASE/$UBUNTU_CODENAME/Dockerfile

HOST_ARCH=$(uname -m)
Expand Down

0 comments on commit b5cef18

Please sign in to comment.