fix(worker): preserve exec-form entrypoint
This commit is contained in:
@@ -49,7 +49,10 @@ $BaseImageReference = "sha256:$BaseImageSha256"
|
||||
$BuildMethod = "docker-commit-exact-layer-v1"
|
||||
$MaximumLayerBytes = [int64](32MB)
|
||||
$ImageWorkdir = "/opt/nodedc/mission-core"
|
||||
$ImageEntrypoint = '["python3","-m","k1link.observatory.m49_worker_container_main"]'
|
||||
# Windows PowerShell reconstructs native command lines and strips unescaped
|
||||
# JSON quotes. Docker commit must receive the escaped quotes so the change is
|
||||
# parsed as exec-form ENTRYPOINT instead of shell form.
|
||||
$ImageEntrypoint = '[\"python3\",\"-m\",\"k1link.observatory.m49_worker_container_main\"]'
|
||||
$ImageCommand = '[]'
|
||||
$FixedEnvironment = @(
|
||||
"PYTHONPATH=/opt/nodedc/mission-core/src:/opt/nodedc/mission-core/deps",
|
||||
|
||||
@@ -31,6 +31,11 @@ def test_worker_agent_installer_is_local_offline_and_non_buildkit() -> None:
|
||||
"LABEL org.opencontainers.image.title="
|
||||
"NODE.DC-Observatory-Worker-006-agent"
|
||||
) in script
|
||||
assert (
|
||||
"$ImageEntrypoint = "
|
||||
"'[\\\"python3\\\",\\\"-m\\\","
|
||||
"\\\"k1link.observatory.m49_worker_container_main\\\"]'"
|
||||
) in script
|
||||
assert 'title="NODE.DC Observatory Worker 006 agent"' not in script
|
||||
assert "docker rm -f $containerId" in script
|
||||
assert "docker rm -f $containerName" not in script
|
||||
|
||||
Reference in New Issue
Block a user