Skip to content

Commit

Permalink
Teardown Lnd Volumes (#25)
Browse files Browse the repository at this point in the history
* add wait for sync issue

* Docker volume rm

* tearodwn volumes w/ everything else
  • Loading branch information
jakesylvestre committed Apr 2, 2021
1 parent 0eedf52 commit f07510e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This library was open sourced as a dependency for another project. While this is
This command will remove lndmock containers:

<!-- TODO: move this into Makefile -->
`docker stop $(docker ps -a -q --filter label="created-by=docker-utils") || true && docker rm -v $(docker ps -a -q --filter label="created-by=docker-utils") || true && docker network rm lightning-network && docker volume rm $(docker ps -a -q --filter label="created-by=docker-utils") `
`docker stop $(docker ps -a -q --filter label="created-by=docker-utils") || true && docker rm -v $(docker ps -a -q --filter label="created-by=docker-utils") || true && docker network rm lightning-network || true && docker volume rm $( docker volume ls -q --filter label="created-by=docker-utils") || true`
<!-- see: https://docs.docker.com/engine/reference/commandline/ps/ -->

# Docker Images
Expand Down
6 changes: 6 additions & 0 deletions lnd.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,17 @@ func (c LightningMocker) CreateLndContainer(name string) (ctn LndContainer, err
Source: "shared",
Target: "/rpc",
Type: mount.TypeVolume,
VolumeOptions: &mount.VolumeOptions{
Labels: c.GetSessionLabels(),
},
},
{
Source: fmt.Sprintf("%s-lnd", name),
Target: "/root/.lnd",
Type: mount.TypeVolume,
VolumeOptions: &mount.VolumeOptions{
Labels: c.GetSessionLabels(),
},
},
},
}, nil, nil, name)
Expand Down

0 comments on commit f07510e

Please sign in to comment.