File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ def add_common_args(parser):
5656 parser .add_argument ('--disablerepo' ,
5757 help = 'disable repositories. Same syntax as yum\' s --disablerepo parameter. '
5858 'If both --enablerepo and --disablerepo are set, --disablerepo will be applied first' )
59+ parser .add_argument ('--no-update' , action = 'store_true' ,
60+ help = 'do not run "yum update" on container start, use it as it was at build time' )
5961
6062def add_container_args (parser ):
6163 parser .add_argument ('-v' , '--volume' , action = 'append' ,
@@ -204,6 +206,9 @@ def container(args):
204206 docker_args += ["-e" , "ENABLEREPO=%s" % args .enablerepo ]
205207 if args .disablerepo :
206208 docker_args += ["-e" , "DISABLEREPO=%s" % args .disablerepo ]
209+ if args .no_update :
210+ docker_args += ["-e" , "NOUPDATE=1" ]
211+
207212 ulimit_nofile = False
208213 if args .ulimit :
209214 for ulimit in args .ulimit :
Original file line number Diff line number Diff line change @@ -54,8 +54,10 @@ if [ -n "$ENABLEREPO" ]; then
5454 sudo $CFGMGR --enable " $ENABLEREPO "
5555fi
5656
57- # update to either install newer updates or to take packages from added repos into account
58- sudo $DNF update -y --disablerepo=epel
57+ if [ -z " $NOUPDATE " ]; then
58+ # update to either install newer updates or to take packages from added repos into account
59+ sudo $DNF update -y --disablerepo=epel
60+ fi
5961
6062cd " $HOME "
6163
You can’t perform that action at this time.
0 commit comments