@staticmethod
def layer_stack(descr):
    """Returns a list of the layers necessary to create the passed docker image id."""
    layers = descr['RootFS']['Layers']
    single_run_layers = []
    last_layer = None
    for layer in layers:
        layer = layer[7:]
        if layer == last_layer:
            continue
        single_run_layers.append(layer)
        last_layer = layer
    return single_run_layers
