Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkg/cmd/compose/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/containerd/platforms"

"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/volume"
"github.com/containerd/nerdctl/v2/pkg/composer"
"github.com/containerd/nerdctl/v2/pkg/composer/serviceparser"
Expand All @@ -55,7 +56,11 @@ func New(client *containerd.Client, globalOptions types.GlobalCommandOptions, op
// Note that we do not close the lock explicitly. Instead, the lock will get released when the `locked` global
// variable will get collected and the file descriptor closed (eg: when the binary exits).
var err error
locked, err = lockutil.Lock(globalOptions.DataRoot)
dataStore, err := clientutil.DataStore(globalOptions.DataRoot, globalOptions.Address)
if err != nil {
return nil, err
}
locked, err = lockutil.Lock(dataStore)
if err != nil {
return nil, err
}
Expand Down