Skip to content

Commit fa57de0

Browse files
committed
Clean up the docker_build.sh file
1 parent e6b8ddf commit fa57de0

1 file changed

Lines changed: 21 additions & 18 deletions

File tree

opencog/docker-build.sh

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,19 @@ usage() {
7575
printf "Usage: ./%s [OPTIONS] [BASE_OS] [DOCKER_NAME] [GITHUB_NAME]
7676
7777
OPTIONS:
78-
-a Pull 'latest' images needed for development from
79-
hub.docker.com/u/${DOCKER_NAME}/
80-
These are currently based on Ubuntu 24.04 LTS
81-
-b Build ${DOCKER_NAME}/opencog-deps:${OS_VERSION} image. Provides
82-
all dependencies and development tools used by ${DOCKER_NAME}.
83-
-s Builds ${DOCKER_NAME}/atomspace:${OS_VERSION} image. Builds all
84-
core AtomSpace packages.
85-
-p Builds ${DOCKER_NAME}/atomspace-py:${OS_VERSION} image. Adds
86-
additional node.js and Python packages commonly used in machine
87-
learning and DL/NN.
88-
-l Builds ${DOCKER_NAME}/learn:${OS_VERSION} image.
89-
90-
-u Ignore the docker image cache when building. This will cause
91-
the container(s) to be built from scratch.
78+
-a Pull the 'latest' images from hub.docker.com/u/${DOCKER_NAME}/
79+
These are currently based on ${BASE_OS}
80+
-b Build the ${DOCKER_NAME}/opencog-deps image. Provides all
81+
dependencies and development tools used by ${DOCKER_NAME}.
82+
-s Build the ${DOCKER_NAME}/atomspace image. Builds all core
83+
AtomSpace packages.
84+
-p Build the ${DOCKER_NAME}/atomspace-py image. Installs
85+
additional node.js and Python packages commonly
86+
used in machine learning and DL/NN.
87+
-l Build the ${DOCKER_NAME}/learn image.
88+
89+
-u Ignore the docker image cache when building. This will
90+
cause the container(s) to be built from scratch.
9291
-h This help message.
9392
9493
BASE_OS: The following have been recently tested:
@@ -98,7 +97,7 @@ usage() {
9897
ubuntu:25.10 # aka Questing Quokka
9998
debian:bookworm # Released June 2023
10099
debian:trixie # Released August 2025
101-
latest (or unspecified/blank) defaults to Ubuntu 24.04 LTS
100+
latest (or unspecified/blank) defaults to ${BASE_OS}
102101
103102
Since gcc-11 or later is needed, debian:bullseye (Aug 2021) won't work.
104103
@@ -113,12 +112,17 @@ fi
113112

114113
# -----------------------------------------------------------------------------
115114
# Sanity check
115+
116+
if [ $UNKNOWN_FLAGS ] ; then usage; exit 1 ; fi
117+
if [ $NO_ARGS ] ; then usage ; fi
118+
116119
if ! command -v docker &> /dev/null
117120
then
121+
echo ""
118122
echo "Error: docker could not be found!"
119123
echo "You can fix this on Debian/Ubuntu by saying:"
120124
echo "$ sudo apt install docker.io"
121-
exit
125+
exit 1
122126
fi
123127

124128
# -----------------------------------------------------------------------------
@@ -204,5 +208,4 @@ if [ $BUILD_LEARN_IMAGE ] ; then
204208
echo "---- Finished build of ${DOCKER_NAME}/learn:${OS_VERSION} ----"
205209
fi
206210

207-
if [ $UNKNOWN_FLAGS ] ; then usage; exit 1 ; fi
208-
if [ $NO_ARGS ] ; then usage ; fi
211+
# -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)