首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >启动:在不交互运行时必须指定错误名称、参数或标志。

启动:在不交互运行时必须指定错误名称、参数或标志。
EN

Stack Overflow用户
提问于 2022-11-04 21:48:23
回答 1查看 1.4K关注 0票数 1

我试图在fly.io中部署一个烧瓶应用程序,但是当在终端中执行flyctl launch时,我会得到一个错误:当不交互运行时,必须指定Error名称参数或标志。

除了控制台之外,我没有看到在fly.io中进行部署的任何其他方式。我尝试使用Dockerfile,但是flyctl launch继续抛出相同的错误。

EN

回答 1

Stack Overflow用户

发布于 2022-11-07 18:56:20

显然flyctl认为您没有以交互的方式运行它的命令行工具。这可能是flyctl本身的错误,也可能不是bug,您可以在fly.io社区中询问这个问题。

解决此问题的方法是将所需的信息添加为参数,而不是提示输入数据。据我所知,您只需要您要启动的应用程序的名称和服务器位置的区域码。可以使用fly help launch命令找到它的语法:

代码语言:javascript
复制
λ flyctl help launch
Create and configure a new app from source code or a Docker image.

Usage:
  flyctl launch [flags]

Flags:
      --auto-confirm                  Will automatically confirm changes when running non-interactively.
      --build-arg strings             Set of build time variables in the form of NAME=VALUE pairs. Can be specified multiple times.
      --build-only                    Build but do not deploy
      --build-secret strings          Set of build secrets of NAME=VALUE pairs. Can be specified multiple times. See https://docs.docker.com/develop/develop-images/build_enhancements/#new-docker-build-secret-information
      --build-target string           Set the target build stage to build if the Dockerfile has more than one stage
      --copy-config                   Use the configuration file if present without prompting
      --detach                        Return immediately instead of monitoring deployment progress
      --dockerfile string             Path to a Dockerfile. Defaults to the Dockerfile in the working directory.
      --dockerignore-from-gitignore   If a .dockerignore does not exist, create one from .gitignore files
  -e, --env strings                   Set of environment variables in the form of NAME=VALUE pairs. Can be specified multiple times.
      --generate-name                 Always generate a name for the app, without prompting
  -i, --image string                  The Docker image to deploy
      --image-label string            Image label to use when tagging and pushing to the fly registry. Defaults to "deployment-{timestamp}".
      --local-only                    Only perform builds locally using the local docker daemon
      --name string                   Name of the new app
      --nixpacks                      Deploy using nixpacks to generate the image
      --no-cache                      Do not use the build cache when building the image
      --no-deploy                     Do not prompt for deployment
      --now                           Deploy now without confirmation
  -o, --org string                    The target Fly organization
      --path string                   Path to the app source root, where fly.toml file will be saved (default ".")
      --push                          Push image to registry after build is complete
  -r, --region string                 The target region (see 'flyctl platform regions')
      --remote-only                   Perform builds on a remote builder instance instead of using the local docker daemon
      --strategy string               The strategy for replacing running instances. Options are canary, rolling, bluegreen, or immediate. Default is canary, or rolling when max-per-region is set.

Global Flags:
  -t, --access-token string   Fly API Access Token
  -j, --json                  json output
      --verbose               verbose output

总之,在您想要在fly.io上启动的应用程序目录中执行的以下命令应该在加拿大多伦多创建一个名为you - app名称的应用程序。

代码语言:javascript
复制
flyctl launch --name your-app-name --region yyz
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74323308

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档