目标:我想使用Docker在本地开发React和Express。我在SELECT r.*, Amount - concidence as diff
FROM (SELECT SUM(CASE WHEN number = streetNumber AND lname = streetName
THEN 1 ELSE 0
END) AS coincidence,
COUNT(streetNumber) as Amount,
FROM records r
) r
WHERE coincidence < Amount;
中有两个服务,其中要保留本地更改的文件夹(docker-compose.yaml
)。
node_modules
我运行了docker命令来创建两个新卷: client:
container_name: web
volumes:
- ./client/:/app
- ./.env:/app/.env
- client_node_modules:/app/node_modules
server:
container_name: server
volumes:
- ./server/:/app
- ./.env:/app/.env
- server_node_modules:/app/node_modules
volumes:
client_node_modules:
external: true
server_node_modules:
external: true
,但是当我在客户端目录中并删除axios依赖项时,它仍然会调用该服务。
在Dockerfile中,我们确实有client_node_modules && server_node_modules
,所以这可能不是持久的吗?我可以这样做吗?我如何实现我的目标?