skip to Main Content

I’m running a docker image of nocodb on my macbook. I chose the sqlite version. Everything works. I have made some projects and tables to test. After testing, I want to reset all this. I stopped and deleted the container, but after starting a new container, all the previous projects and tables… are still there. I want a clean restart. I tried to delete all volumes, I deleted the nocodb image and downloaded it again, but it seems like the sqlite db is somewhere on my laptop.

What I want to achieve: when I stop and delete a docker container, I want to be able to delete all associated data, so that when I restart the container, it starts from the beginning.

To run container:

ocker run -d --name nocodb 
-v "$(pwd)"/nocodb:/usr/app/data/ 
-p 8080:8080 
nocodb/nocodb:latest

To stop/delete container:

docker stop <ID>
docker rm <ID>
docker system prune

2

Answers


  1. You are storing your data in $(pwd)/nocodb with this command:

    docker run -d --name nocodb 
      -v "$(pwd)"/nocodb:/usr/app/data/ 
      -p 8080:8080 
      nocodb/nocodb:latest
    

    To reset, you’ll need to delete the persistent data in that directory.

    Login or Signup to reply.
  2. Your data is stored in $(pwd)/nocodb. You’ll need to delete this directory.

    Alternatively for Docker volumes:

    Running docker system prune does NOT remove volumes, for this you need to add the --volumes option. Be careful with this command, as it will delete ALL volumes, including those you might want to keep.

    To delete only one specific Docker volume run docker volume rm <VOLUME NAME>.

    To delete all unused volumes (unused volumes are volumes that are not referenced by any containerts) run docker volume prune.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search