@@ -18,7 +18,7 @@ var cleanCmd = &cobra.Command{
1818
1919var wipeCmd = & cobra.Command {
2020 Use : "wipe-images" ,
21- Short : "Nuke ALL back2base containers and images" ,
21+ Short : "Nuke ALL oss- back2base containers and images" ,
2222 RunE : runWipe ,
2323}
2424
@@ -46,31 +46,38 @@ func runClean(cmd *cobra.Command, args []string) error {
4646func runWipe (cmd * cobra.Command , args []string ) error {
4747 cfg := resolveConfig ()
4848
49- // Find back2base images
49+ // Find oss- back2base/back2base-compatible images.
5050 imgOut , _ := exec .Command ("docker" , "images" , "--format" , "{{.Repository}}:{{.Tag}}" ).Output ()
5151 var imageRefs []string
5252 for _ , line := range strings .Split (string (imgOut ), "\n " ) {
5353 line = strings .TrimSpace (line )
54- if strings .HasPrefix (line , "back2base-claude" ) ||
54+ if strings .HasPrefix (line , "oss-back2base-claude" ) ||
55+ strings .HasPrefix (line , "back2base-claude" ) ||
5556 strings .HasPrefix (line , "ramseymcgrath/back2base-base" ) ||
5657 strings .HasPrefix (line , "back2base/back2base:" ) {
5758 imageRefs = append (imageRefs , line )
5859 }
5960 }
6061
61- // Find back2base containers from image names and compose labels
62+ // Find oss-back2base/back2base-compatible containers from image names and
63+ // compose labels.
6264 ctrOut1 , _ := exec .Command ("docker" , "ps" , "-a" ,
6365 "--format" , "{{.Names}}\t {{.Image}}" ).Output ()
64- ctrOut2 , _ := exec .Command ("docker" , "ps" , "-a" ,
66+ ctrOut2a , _ := exec .Command ("docker" , "ps" , "-a" ,
6567 "--filter" , "label=com.docker.compose.project=back2base" ,
6668 "--format" , "{{.Names}}" ).Output ()
69+ ctrOut2b , _ := exec .Command ("docker" , "ps" , "-a" ,
70+ "--filter" , "label=com.docker.compose.project=oss-back2base" ,
71+ "--format" , "{{.Names}}" ).Output ()
72+ ctrOut2 := append (ctrOut2a , ctrOut2b ... )
6773
6874 containerSet := make (map [string ]bool )
6975 for _ , line := range strings .Split (string (ctrOut1 ), "\n " ) {
7076 parts := strings .SplitN (strings .TrimSpace (line ), "\t " , 2 )
7177 if len (parts ) == 2 {
7278 img := parts [1 ]
73- if strings .HasPrefix (img , "back2base-claude" ) ||
79+ if strings .HasPrefix (img , "oss-back2base-claude" ) ||
80+ strings .HasPrefix (img , "back2base-claude" ) ||
7481 strings .HasPrefix (img , "back2base/back2base" ) {
7582 containerSet [parts [0 ]] = true
7683 }
@@ -89,7 +96,7 @@ func runWipe(cmd *cobra.Command, args []string) error {
8996 }
9097
9198 if len (imageRefs ) == 0 && len (containers ) == 0 {
92- fmt .Println ("No back2base containers or images found." )
99+ fmt .Println ("No oss- back2base containers or images found." )
93100 return nil
94101 }
95102
@@ -140,6 +147,6 @@ func runWipe(cmd *cobra.Command, args []string) error {
140147 exec .Command ("docker" , rmiArgs ... ).Run ()
141148 }
142149
143- fmt .Println ("Done. Next 'back2base' run will rebuild from source." )
150+ fmt .Println ("Done. Next 'oss- back2base' run will rebuild from source." )
144151 return nil
145152}
0 commit comments