コード例 #1
0
    def _cleanup():
        try:
            container = docker_client.containers.get(
                "test_reusable_conflicting_container_vol")
            container.remove(force=True)
        except NotFound:
            pass

        try:
            volume = docker_client.volumes.get(
                "test_reusable_conflicting_container")
            volume.remove()
        except NotFound:
            pass
コード例 #2
0
 def _cleanup():
     try:
         volume = docker_client.volumes.get("my-reusable-volume")
     except NotFound:
         return
     volume.remove()
コード例 #3
0
 def _cleanup():
     try:
         volume = docker_client.volumes.get("test_reusable_conflict")
     except NotFound:
         return
     volume.remove()