mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-28 03:53:33 +00:00
move generic docker types to top level docker package
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/docker/docker/client"
|
||||
"log/slog"
|
||||
"time"
|
||||
"uncloud/internal/machine/docker/container"
|
||||
"uncloud/internal/docker"
|
||||
"uncloud/internal/machine/store"
|
||||
)
|
||||
|
||||
@@ -152,8 +152,8 @@ func (m *Manager) syncContainersToStore(ctx context.Context) error {
|
||||
// List only Uncloud service containers identified by their labels.
|
||||
containers, err := m.client.ContainerList(ctx, dockercontainer.ListOptions{
|
||||
Filters: filters.NewArgs(
|
||||
filters.Arg("label", container.LabelServiceID),
|
||||
filters.Arg("label", container.LabelServiceName),
|
||||
filters.Arg("label", docker.LabelServiceID),
|
||||
filters.Arg("label", docker.LabelServiceName),
|
||||
),
|
||||
})
|
||||
if err != nil {
|
||||
@@ -185,7 +185,7 @@ func (m *Manager) syncContainersToStore(ctx context.Context) error {
|
||||
|
||||
// Create or update the current Docker containers in the store.
|
||||
for _, dc := range containers {
|
||||
c := &container.Container{Container: dc}
|
||||
c := &docker.Container{Container: dc}
|
||||
if err = m.store.CreateOrUpdateContainer(ctx, c, m.machineID); err != nil {
|
||||
storeErr = errors.Join(storeErr, fmt.Errorf("create or update container %q: %w", c.ID, err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user