多个开发人员如何使用相同的vcproj文件?(How can multiple developers use the same vcproj files?)
我正在与另外两个基于FireBreath的开发人员合作开发一个项目。 到目前为止,我已经能够在我的机器上完美地工作,但我们需要通过Mercurial协调我们的开发。 所以我将文件推送到存储库,并认为一切都很顺利。
不幸的是,这不起作用。
组成解决方案的各种
.vcproj
文件都包含对本地文件系统的硬编码引用。 这对我来说很好,因为我没有移动项目。 但是,当您尝试在具有不同文件结构(不同的驱动器号,不同的文件夹位置等)的另一台计算机上构建解决方案时,一切都会中断。我使用FireBreath的标准项目生成脚本(Python),然后使用Visual Studio CMake脚本(prep2008.cmd)生成解决方案文件。 我可以做些什么来调整内容以便其他开发人员可以使用相同的代码库?
I'm working on a project with two other developers that's built on FireBreath. So far, I've been able to get things working perfectly on my machine, but we need to coordinate our development via Mercurial. So I pushed my files to the repository and thought all was well.
Unfortunately, that doesn't work.
The various
.vcproj
files that make up the solution all contain hard-coded references to my local file system. This works fine for me, because I'm not moving the project around. But when you try to build the solution on another machine with a different file structure (different drive letter, different folder location, etc.) everything breaks.I used FireBreath's standard project generation script (Python) and then the Visual Studio CMake script (prep2008.cmd) to generate the solution files. What can I do to tweak things so that other developers can use the same code base?
原文:https://stackoverflow.com/questions/4229718
最满意答案
这只意味着docker-compose正在重新启动先前停止的容器(或重新连接到它,如果它已经在运行),并且因为没有必要重新构建映像:
apkmirrorscrapercompose_db_1 is up-to-date
因此,您在日志中“再次”看到的是该容器的
docker logs
,其中包含postgres的所有生命生成日志。只需删除容器并重新启动(db数据将保留在卷中,因此它将继续存在):
docker-compose rm db
This just means that docker-compose is re-starting your previously stopped container (or re-attaching to it, if it is already running), and because of there is no need to re-build the image:
apkmirrorscrapercompose_db_1 is up-to-date
So, what your are seeing "again" in the logs is the
docker logs
of that container which includes all the life-generated logs of postgres.Simply remove the container and start again (the db data is persisted in the volume, so it will survive):
docker-compose rm db
相关问答
更多-
docker-compose另一个docker-compose的链接容器(docker-compose link container of another docker-compose)[2024-02-18]
Docker网络是关键。 你可以做: $ docker network create some-net 然后在您的撰写文件中,将以下内容添加到底部: networks: default: external: name: some-net 这会将默认网络(对于每个容器)设置为先前定义的网络(some-net)。 然后,所有容器(无论它们在何处定义的组合文件)都应该能够使用内置服务名称DNS解析相互通信。 相关文档: https : //docs.docker.com/compose/ ... -
如何在Docker上注册Postgres容器主机 - 组成?(How do you register a Postgres container host on docker-compose up?)[2022-05-27]
您必须将您的两个容器链接到docker-compose文件中。 然后,您将能够使用容器的服务名称访问您的数据库。 例 links: - postgres:postgres 如果您需要更多帮助,请链接您docker-compose.yml 。 You must link your two containers in your docker-compose file. Then you will be able to access to your database using the service na ... -
将Docker运行脚本转移到撰写文件 - postgres不运行?(Transferring Docker run script to compose file - postgres doesn't run?)[2022-01-21]
假设数据库和memcached服务专用于您的Web应用程序(也就是说,不需要从其他任何地方访问它们), 可能会从docker-compose.yml文件中删除docker-compose.yml内容。 在服务定义中指定image和build是没有意义的,所以我对你真正想要的东西做了一些假设。 我会从这样的事情开始: version: '2' services: web: build: ./ci ports: - '8000:8080' depends_on: ... -
这只意味着docker-compose正在重新启动先前停止的容器(或重新连接到它,如果它已经在运行),并且因为没有必要重新构建映像: apkmirrorscrapercompose_db_1 is up-to-date 因此,您在日志中“再次”看到的是该容器的docker logs ,其中包含postgres的所有生命生成日志。 只需删除容器并重新启动(db数据将保留在卷中,因此它将继续存在): docker-compose rm db This just means that docker-compo ...
-
Docker Compose + Spring Boot + Postgres连接(Docker Compose + Spring Boot + Postgres connection)[2023-03-01]
每个容器都有自己的网络接口和自己的本地主机。 所以改变Java指向Postgres的方式: spring.datasource.url=jdbc:postgresql://localhost:5432/sample 至: spring.datasource.url=jdbc:postgresql://db:5432/sample db将解析到适当的Postgres IP。 奖金。 使用docker-compose你不需要手动构建你的图像。 所以改变: web: image: myuser/manag ... -
使用docker-compose在服务器上构建多容器泊坞窗图像(Building multi-container docker image on server with docker-compose)[2022-01-05]
问题是你不应该为生产建立一个docker镜像。 通常的设置是您可以构建可在多个环境中运行的映像。 在UAT上测试这个图像,当它正常时,你让生产环境停止当前的容器,然后根据新图像开始新的。 要存储图像,您可以使用即码头注册表。 至于你的错误,他们正在发生,因为在你执行docker-compose build的机器上你没有db_config文件。 类似于将生成文件上传到生产环境的必要性,为了在生产环境中生成映像,您需要提供构建所需的所有必需项目文件。 如果你想让它变得“干净”,那么正确的方法是在构建环境中构建一 ... -
要访问容器中的postgres,请运行容器范围内的cli docker-compose run postgres psql 您还可以连接到容器发布端口,该端口尚未在您现有的配置中发布。 postgres: build: context: . dockerfile: ./compose/production/postgres/Dockerfile volumes: - postgres_data_local:/var/lib/postgresql/da ...
-
0.0.0.0是监听地址,它用于监听所有接口,而不是您连接的IP。 在连接字符串中,在案例database指定要连接的主机名的服务名称。 The 0.0.0.0 is the listening address, it's used to listen on all interfaces and isn't an IP that you connect to. In your connect string, specify the service name for the hostname to conne ...
-
使用Docker Compose运行相同多容器应用程序的副本(Running copies of the same multi-container app with Docker Compose)[2023-04-08]
如果要重用图像,则应独立于撰写脚本构建图像。 run docker build -t somewebapp/web:latest , 然后更改docker-compose.yml的构建部分以引用图像。 If you want to reuse the image, you should build the image independent of the compose script. run docker build -t somewebapp/web:latest , then change you ... -
不推荐使用链接。 相反,您可以创建一个新网络并将所有容器添加到该网络: $ docker network create myapp 请注意,根据Compose的网络文档 ,将自动为您的撰写文件创建此类网络。 这意味着您根本不需要设置任何链接或网络,因为Compose已经自动创建了一个网络,并且所有容器都应该使用其容器名称在该网络中可访问。 另请参阅使用Compose with Swarm获取一些限制。 Using links is deprecated. Instead, you can create a ...