IceWhaleTech / CasaOS

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.
https://casaos.io
Apache License 2.0
23.74k stars 1.28k forks source link

[Bug] CasaOS deletes multiple images #1522

Open reinaldo558 opened 7 months ago

reinaldo558 commented 7 months ago

Describe the bug When there's multiple images of the the same type running (like 3 different postgres images) when removing one of them, CasaOS deletes them all.

To Reproduce

Steps to reproduce the behavior:

  1. Have any image running
  2. Install another instance, different name, ports, volume, variablea, but same base image.
  3. Delete either of them
  4. CasaOS will remove both.

Expected behavior CasaOS remove only the selected image.

 - OS: Ubuntu server, headless 
 - Browser Brave 
CorrectRoadH commented 7 months ago

Could you share more info(like casaos version) and the reproduce steps? I can't reproduce it.

I have multiple container: CleanShot 2023-11-27 at 10 04 07@2x

then I remove the first: CleanShot 2023-11-27 at 10 05 04@2x

And nobody be remove also CleanShot 2023-11-27 at 10 05 15@2x

reinaldo558 commented 7 months ago

Hi, yes:

I had:

I gave all postgres a different name and hostname (postgres-casa, postgressql and postgres-reactive) What I modified on the compose files (or CasaOS image settings) was Title, hostname, port, volume folde. User/pass I only modified for the immich one.

My immich postgres:
name: clever_wayne
services:
  postgres:
    cpu_shares: 90
    command: []
    container_name: postgresql
    deploy:
      resources:
        limits:
          memory: 28989M
    environment:
      - POSTGRES_DB=immich
      - POSTGRES_PASSWORD=
      - POSTGRES_USER=
    image: postgres:15
    labels:
      icon: https://github.com/walkxcode/dashboard-icons/blob/main/png/postgres.png?raw=true
    ports:
      - target: 5432
        published: "5432"
        protocol: tcp
    restart: unless-stopped
    volumes:
      - type: bind
        source: /DATA/AppData/postgre
        target: /var/lib/postgresql/data
    devices: []
    cap_add: []
    network_mode: bridge
    privileged: false
x-casaos:
  author: self
  category: self
  hostname: ""
  icon: https://github.com/walkxcode/dashboard-icons/blob/main/png/postgres.png?raw=true
  index: /
  port_map: ""
  scheme: http
  store_app_id: clever_wayne
  title:
    custom: PostgreSQL

After uninstalling all services from https://github.com/AmruthPillai/Reactive-Resume/blob/main/tools/compose/simple.yml, my other 2 postgres images were also deleted.