@@ -85,6 +85,13 @@ set -e
8585# $ sudo sh install-docker.sh --start-daemon
8686#
8787# Note: This option requires appropriate privileges to manage system services.
88+ # --setup-repo
89+ #
90+ # Use the --setup-repo option to configure Docker's package repositories without
91+ # installing Docker packages. This is useful when you want to add the repository
92+ # but install packages separately:
93+ #
94+ # $ sudo sh install-docker.sh --setup-repo
8895#
8996# ==============================================================================
9097
122129mirror=' '
123130DRY_RUN=${DRY_RUN:- }
124131START_DAEMON=${START_DAEMON:- }
132+ REPO_ONLY=${REPO_ONLY:- 0}
125133while [ $# -gt 0 ]; do
126134 case " $1 " in
127135 --channel)
@@ -142,6 +150,10 @@ while [ $# -gt 0 ]; do
142150 VERSION=" ${2# v} "
143151 shift
144152 ;;
153+ --setup-repo)
154+ REPO_ONLY=1
155+ shift
156+ ;;
145157 --* )
146158 echo " Illegal option $1 "
147159 ;;
@@ -565,7 +577,7 @@ do_install() {
565577 ubuntu.focal|ubuntu.bionic|ubuntu.xenial|ubuntu.trusty)
566578 deprecation_notice " $lsb_dist " " $dist_version "
567579 ;;
568- ubuntu.mantic|ubuntu.lunar|ubuntu.kinetic|ubuntu.impish|ubuntu.hirsute|ubuntu.groovy|ubuntu.eoan|ubuntu.disco|ubuntu.cosmic)
580+ ubuntu.oracular|ubuntu. mantic|ubuntu.lunar|ubuntu.kinetic|ubuntu.impish|ubuntu.hirsute|ubuntu.groovy|ubuntu.eoan|ubuntu.disco|ubuntu.cosmic)
569581 deprecation_notice " $lsb_dist " " $dist_version "
570582 ;;
571583 fedora.* )
@@ -592,6 +604,11 @@ do_install() {
592604 $sh_c " echo \" $apt_repo \" > /etc/apt/sources.list.d/docker.list"
593605 $sh_c ' apt-get -qq update >/dev/null'
594606 )
607+
608+ if [ " $REPO_ONLY " = " 1" ]; then
609+ exit 0
610+ fi
611+
595612 pkg_version=" "
596613 if [ -n " $VERSION " ]; then
597614 if is_dry_run; then
@@ -684,6 +701,11 @@ do_install() {
684701 $sh_c " yum makecache"
685702 fi
686703 )
704+
705+ if [ " $REPO_ONLY " = " 1" ]; then
706+ exit 0
707+ fi
708+
687709 pkg_version=" "
688710 if command_exists dnf; then
689711 pkg_manager=" dnf"
0 commit comments