Skip to content

Commit b70f1b8

Browse files
committed
Merge branch 'develop' into chzheng/docker_image_flag
2 parents 1321793 + e3ae587 commit b70f1b8

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
* @Obliviour @44past4 @sharabiani @pawloch00 @BluValor @gcie @RoshaniN
1+
* @Obliviour @44past4 @sharabiani @pawloch00 @BluValor @gcie @RoshaniN @scaliby @jamOne- @SikaGrr @FIoannides @fatoshoti
22
slice/ @mwysokin @mimowo @gabesaba @PBundyra @mwielgus @pajakd

src/xpk/core/docker_image.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
DEFAULT_DOCKER_IMAGE = 'python:3.10'
2727
DEFAULT_SCRIPT_DIR = os.getcwd()
2828
PLATFORM = 'linux/amd64'
29+
CLOUD_PREFIXES = ['gcr.io', 'docker.pkg.dev', 'us-docker.pkg.dev']
2930

3031

3132
def 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:

0 commit comments

Comments
 (0)