diff --git a/changes/213.changed b/changes/213.changed new file mode 100644 index 00000000..ef6ff17f --- /dev/null +++ b/changes/213.changed @@ -0,0 +1 @@ +Add `apt update` to docker user images to limit vulnerabilities. diff --git a/substrafl/remote/register/register.py b/substrafl/remote/register/register.py index 207a20a5..acfdc4a1 100644 --- a/substrafl/remote/register/register.py +++ b/substrafl/remote/register/register.py @@ -34,6 +34,9 @@ DOCKERFILE_TEMPLATE = """ FROM {docker_image} +# update image +RUN apt update -y + # install dependencies RUN python{python_version} -m pip install -U pip diff --git a/tests/remote/register/test_register.py b/tests/remote/register/test_register.py index 0005e844..db867616 100644 --- a/tests/remote/register/test_register.py +++ b/tests/remote/register/test_register.py @@ -67,6 +67,9 @@ def test_create_dockerfile(tmp_path, mocker, local_installable_module): expected_dockerfile = f""" FROM substratools-mocked +# update image +RUN apt update -y + # install dependencies RUN python{python_version} -m pip install -U pip