从本地GitLab运行程序执行时,如何在docker中包含构建标记?

时间:2020-04-10 10:35:17

标签: docker gitlab gitlab-ci-runner

我正在本地调试映像的docker构建,希望能更好地了解构建失败的原因。我在本地运行GitLab CI运行程序:

gitlab-runner exec docker build https://gitlab.com/happy_hedgehog/another_tdd.git#production:services/client test-driven-client:09d8s4324kk -f Dockerfile-prod --build-arg REACT_APP_USERS_SERVICE_URL=""

赛跑者抛出FATAL: flag provided but not defined: -f,表示它不理解标志。 docker标志指定从哪个文件开始构建。我该如何解决?

我检查了gitlab-runner help部分,但找不到任何帮助。

1 个答案:

答案 0 :(得分:0)

我认为您今天不能在GitLab中做到这一点。有一个未解决的问题(https://gitlab.com/gitlab-org/gitlab/-/issues/22801)允许指定备用Dockerfile。