英文:
clear all docker data for a clean restart
问题
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
英文:
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
答案1
得分: 2
你正在使用以下命令将数据存储在 $(pwd)/nocodb
中:
docker run -d --name nocodb \
-v "$(pwd)"/nocodb:/usr/app/data/ \
-p 8080:8080 \
nocodb/nocodb:latest
要重置,你需要删除该目录中的持久数据。
英文:
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.
答案2
得分: 1
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 containers) run docker volume prune
.
英文:
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
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论