How to use the rocker.core.pull_image function in rocker

To help you get started, we’ve selected a few rocker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github osrf / rocker / test / test_core.py View on Github external
def test_pull_image(self):
        TEST_IMAGE='alpine:latest'
        docker_client = get_docker_client()

        l = docker_client.images()
        tags = set(chain.from_iterable([i['RepoTags'] for i in l if i['RepoTags']]))
        print(tags)
        if TEST_IMAGE in tags:
            docker_client.remove_image(TEST_IMAGE)
            print('removed image %s' % TEST_IMAGE)
        self.assertTrue(pull_image(TEST_IMAGE))
github osrf / rocker / test / test_core.py View on Github external
def test_failed_pull_image(self):
        self.assertFalse(pull_image("osrf/ros:does_not_exist"))