我试图使用本地可用的Dockerfile构建Docker镜像.
docker build -t newimage .
Run Code Online (Sandbox Code Playgroud)
我之前也多次使用过这个命令,但不知何故它现在不能正常工作,我找不到它的原因.
如果有人可以帮助我寻找可能的解决方案或可能的区域来寻找问题,我将会非常有帮助.
我已经查看了其他可能与之相关的帖子: Docker构建标记存储库名称
由于在某些特定测试环境中运行测试的某些要求,我们希望构建一个自定义容器来在 Concourse CI 上运行测试。
我们知道一个工作流程是
Concourse --> Build Image --> Push to Artifactory/Docker Hub --> Pull into pipeline --> run container --> run the tests
Run Code Online (Sandbox Code Playgroud)
但是我们不需要将图像推送到 Hub,而是更喜欢这样的工作流程
Concourse -- Build Image -- run container -- run the tests
Run Code Online (Sandbox Code Playgroud)
我们可以实现第二个工作流程吗?
这是我用来运行map reduce on sourceCollectionName和获取输出的代码targetCollectionName.但是永远不会创建targetCollectionName.
new MongoClient("localhost").getDatabase(dbName).getCollection(sourceCollectionName)
.mapReduce(map, reduce)
.action(MapReduceAction.REPLACE)
.databaseName(dbName)
.collectionName(targetCollectionName)
.sharded(false);
Run Code Online (Sandbox Code Playgroud)
虽然我能够MapReduceIterable在迭代时获得输出,但结果会按预期转储.这是正确的方法吗?
MapReduceIterable mapReduceIterable = new MongoClient("localhost").getDatabase(dbName).getCollection(sourceCollectionName)
.mapReduce(map, reduce)
.action(MapReduceAction.REPLACE)
.databaseName(dbName)
.collectionName(targetCollectionName)
.sharded(false);
for(Object o:mapReduceIterable){
//Just Iterating makes map reduce to dump output collection
}
Run Code Online (Sandbox Code Playgroud)