Concourse 无法构建和部署到 docker,我收到此错误:
t 的无效参数“ http://10.250.249.243:5000/frontend-srv-img :latest ”:解析参考错误:“ http://10.250.249.243:5000/frontend-srv-img :latest ”不是有效的存储库/标签请参阅“docker build --help”。
我正在尝试在任务中构建前端源代码库,从而产生 dist: frontend-dist。
然后我想在本地 docker 注册表的“put”中使用这个 dist,所以我提供了带有 dist 文件夹和 docker 文件路径的“put”。注意: dist 和 docker 文件来自不同的 repos/branch。
---
#Git repo containing docker-template and build scripts:
resources:
- name: devops-repo
type: git
source:
uri: git@bitbucket.org:myorg/client-devops.git
branch: dev
private_key: {{private-key}}
#Git repo containing docker-template and build scripts:
- name: client-repo
type: git
source:
uri: git@bitbucket.org:myorg/client-devops.git
branch: frontend
private_key: {{private-key}}
#Docker-image containing the built source:
- name: frontend-server-image
type: docker-image
source:
repository: http://10.250.249.243:5000/frontend-srv-img
insecure_registries: ["http://10.250.249.243:5000"]
jobs:
- name: job-frontend
public: true
plan:
- aggregate:
- get: devops-repo
trigger: true
- get: client-repo
trigger: true
- task: Build frontend using grunt
file: devops-repo/build-frontend.yml
- put: frontend-server-image
params:
build: frontend-dist
dockerfile: devops-repo/frontend-server/Dockerfile
构建前端.yml
---
platform: linux
image_resource:
type: docker-image
source:
repository: node
tag: 'latest'
inputs:
- name: client-repo
outputs:
- name: frontend-dist
run:
path: sh
args:
- -exc
- |
ls -lah
cd client-repo
# npm install -g grunt-cli
# npm install -q
# grunt pipeline
mkdir dist
touch dist/test123
mv -f dist ../frontend-dist
cd ..
ls -lah