Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create rename_docker_volume.yaml #86

Merged
merged 5 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ workflows/src/generated_workflows/*
.idea
build_ts/dist
build_ts/node_modules/
.DS_Store
17 changes: 17 additions & 0 deletions specs/docker/rename_docker_volume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Rename a Docker volume
command: "docker volume create --name {{new_volume}} && docker run --rm -it -v {{old_volume}}:/from -v {{new_volume}}:/to alpine ash -c 'cd /from ; cp -av . /to' && docker volume rm {{old_volume}}"
tags:
- docker
description: Renames a Docker volume by creating a new volume, copying all of its content to from the old to the new volume and then deletes the old volume.
arguments:
- name: old_volume
description: The name of the old volume
default_value: ~
- name: new_volume
description: The name of the new volume
default_value: ~
source_url: "https://github.com/moby/moby/issues/31154#issuecomment-360531460"
author: Hyruu
author_url: "https://github.com/Hyruu"
shells: []