Skip to content

Commit

Permalink
Changed filter name
Browse files Browse the repository at this point in the history
  • Loading branch information
harshau007 committed Apr 19, 2024
1 parent dd03bb6 commit a35744a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/spf13/cobra"
)

// docker ps -a --filter "label=createdBy=instacode"
// docker ps -a --filter "label=createdBy=devcraft"

type ContainerInfo struct {
ID string
Expand Down Expand Up @@ -171,7 +171,7 @@ func listContainers() ([]ContainerInfo, error) {
}
defer cli.Close()

filters := filters.NewArgs(filters.Arg("label", "createdBy=instacode"))
filters := filters.NewArgs(filters.Arg("label", "createdBy=devcraft"))
containers, err := cli.ContainerList(ctx, containertypes.ListOptions{All: true, Filters: filters})
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func containerList() ([]containerDetail, error) {
defer cli.Close()

filters := filters.NewArgs(
filters.Arg("label", "createdBy=instacode"),
filters.Arg("label", "createdBy=devcraft"),
filters.Arg("status", "exited"),
)
containers, err := cli.ContainerList(ctx, containertypes.ListOptions{Filters: filters})
Expand Down
2 changes: 1 addition & 1 deletion cmd/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func containerNames() ([]containerDetail, error) {
}
defer cli.Close()

filters := filters.NewArgs(filters.Arg("label", "createdBy=instacode"))
filters := filters.NewArgs(filters.Arg("label", "createdBy=devcraft"))
containers, err := cli.ContainerList(ctx, containertypes.ListOptions{Filters: filters})
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:20.04

LABEL maintainer="https://github.com/harshau007"
LABEL createdBy="instacode"
LABEL createdBy="devcraft"

RUN apt-get update && apt-get install -y curl ca-certificates software-properties-common

Expand Down

0 comments on commit a35744a

Please sign in to comment.