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
2
2
slice / @ mwysokin @ mimowo @ gabesaba @ PBundyra @ mwielgus @ pajakd
Original file line number Diff line number Diff line change 26
26
DEFAULT_DOCKER_IMAGE = 'python:3.10'
27
27
DEFAULT_SCRIPT_DIR = os .getcwd ()
28
28
PLATFORM = 'linux/amd64'
29
+ CLOUD_PREFIXES = ['gcr.io' , 'docker.pkg.dev' , 'us-docker.pkg.dev' ]
29
30
30
31
31
32
def validate_docker_image (docker_image , args ) -> int :
@@ -223,18 +224,18 @@ def setup_docker_image(args) -> tuple[int, str]:
223
224
"""
224
225
225
226
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 :
227
229
docker_image = args .base_docker_image # fallback for legacy users
228
230
229
- if not docker_image or docker_image == DEFAULT_DOCKER_IMAGE :
231
+ if not docker_image :
230
232
xpk_print (
231
- 'Error: No docker image specified. Please provide --docker-image. '
233
+ f' No docker image specified, using default: { DEFAULT_DOCKER_IMAGE } '
232
234
)
233
- xpk_exit ( 1 )
235
+ docker_image = DEFAULT_DOCKER_IMAGE
234
236
235
- cloud_prefixes = ['gcr.io' , 'docker.pkg.dev' , 'us-docker.pkg.dev' ]
236
237
is_cloud_image = any (
237
- docker_image .startswith (prefix ) for prefix in cloud_prefixes
238
+ docker_image .startswith (prefix ) for prefix in CLOUD_PREFIXES
238
239
)
239
240
240
241
if is_cloud_image :
You can’t perform that action at this time.
0 commit comments