File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1- * @ Obliviour @ 44past4 @ sharabiani @ pawloch00 @ BluValor @ gcie @ RoshaniN
1+ * @ Obliviour @ 44past4 @ sharabiani @ pawloch00 @ BluValor @ gcie @ RoshaniN @ scaliby @ jamOne- @ SikaGrr @ FIoannides @ fatoshoti
22slice / @ mwysokin @ mimowo @ gabesaba @ PBundyra @ mwielgus @ pajakd
Original file line number Diff line number Diff line change 2626DEFAULT_DOCKER_IMAGE = 'python:3.10'
2727DEFAULT_SCRIPT_DIR = os .getcwd ()
2828PLATFORM = 'linux/amd64'
29+ CLOUD_PREFIXES = ['gcr.io' , 'docker.pkg.dev' , 'us-docker.pkg.dev' ]
2930
3031
3132def validate_docker_image (docker_image , args ) -> int :
@@ -223,18 +224,18 @@ def setup_docker_image(args) -> tuple[int, str]:
223224 """
224225
225226 docker_image = args .docker_image
226- if not docker_image or docker_image == DEFAULT_DOCKER_IMAGE :
227+
228+ if not docker_image and args .base_docker_image :
227229 docker_image = args .base_docker_image # fallback for legacy users
228230
229- if not docker_image or docker_image == DEFAULT_DOCKER_IMAGE :
231+ if not docker_image :
230232 xpk_print (
231- 'Error: No docker image specified. Please provide --docker-image. '
233+ f' No docker image specified, using default: { DEFAULT_DOCKER_IMAGE } '
232234 )
233- xpk_exit ( 1 )
235+ docker_image = DEFAULT_DOCKER_IMAGE
234236
235- cloud_prefixes = ['gcr.io' , 'docker.pkg.dev' , 'us-docker.pkg.dev' ]
236237 is_cloud_image = any (
237- docker_image .startswith (prefix ) for prefix in cloud_prefixes
238+ docker_image .startswith (prefix ) for prefix in CLOUD_PREFIXES
238239 )
239240
240241 if is_cloud_image :
You can’t perform that action at this time.
0 commit comments