func GetLayerIDs(client *docker.Client, name string) (ids []string, err error) { histories, err := client.ImageHistory(name) if err != nil { return } for _, history := range histories { ids = append(ids, history.ID) } return }