2

我有一个简单的任务,我想在我的本地大厅实例上执行:

构建前端.yml

---
platform: linux

image_resource:
  type: docker-image
  source:
    repository: node
    tag: 'latest'

inputs:
- name: client-devops

run:
  path: client-devops/scripts/test

任务被执行:

client-devops daka$ fly -t frontend execute --config build-frontend.yml
executing build 1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 8080: Connection refused
gzip: invalid magic
tar: Child returned status 1
tar: Error is not recoverable: exiting now
exit status 2

目标可用:

client-devops daka$ fly targets
name          url                         expiry                       
frontend      http://127.0.0.1:8080       Fri, 11 Nov 2016 09:13:55 UTC

为什么它说无法连接到 localhost,我可以从浏览器连接到 UI?

4

1 回答 1

1

您的外部 URL 不能配置为localhost127.0.0.1- 它必须可以被其他机器访问。

于 2016-11-10T18:10:10.940 回答