简体   繁体   English

导航到 docker-compose.yml 文件时遇到问题

[英]Have problem to navigate to a docker-compose.yml file

enter image description here在此处输入图像描述

I need to navigate to my docker-compose.yml file but writing cd docker-compose.yml doesn't work.我需要导航到我的 docker-compose.yml 文件,但写入 cd docker-compose.yml 不起作用。 The Terminal tells me that the catalog name is wrong or invalid, couldn't find the right translation.终端告诉我目录名称错误或无效,找不到正确的翻译。 I want to navigate to the docker-compose so i can run docker up in the Terminal.我想导航到 docker-compose,这样我就可以在终端中运行 docker。

You need to do cd app .你需要做cd app

docker-compose.yml is a file, inside the directory app . docker-compose.yml是一个文件,位于app目录中。 Since cd moves you to a directory, it makes no sense to launch it on a file.由于cd将您移动到一个目录,因此在文件上启动它是没有意义的。

The command you want once you are in the same folder as your docker-compose.yml is docker-compose up .一旦您与 docker-compose.yml 位于同一文件夹中,您想要的命令是docker-compose up

So to sum it up:所以总结一下:

cd app
docker-compose up

You are already in the directory for docker-compose, but you can't cd to a file, you want to run commands for it.您已经在 docker-compose 的目录中,但是您不能 cd 到一个文件,您想为它运行命令。

Its not possible to cd into a file, you can use docker-compose command to run the file.无法cd进入文件,您可以使用 docker-compose 命令运行该文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 带有 docker-compose.yml 的 Dockerfile - Dockerfile with docker-compose.yml 使用PyYAML编辑docker-compose.yml - Editing docker-compose.yml with PyYAML 在 docker-compose.yml 中运行 Python package 和 multiple.py 脚本 - Run Python package with multiple .py scripts in docker-compose.yml 更改 docker-compose.yml 以使用 python 添加端口 - Alter docker-compose.yml to add ports with python MacOS:如何使用 docker-compose.yml 和 Dockerfile 挂载卷? - MacOS: How to mount volumes using docker-compose.yml and Dockerfile? 未在服务 docker-compose.yml 中指定卷 - Not specifying volumes within service docker-compose.yml docker - 如何从 env.ini 文件外部为 docker-compose.yml 文件设置环境数据库? - docker - How to set up environment database for docker-compose.yml file from env.ini file outide? 在文件 Dockerfile、docker-compose.yml、python.py 和 Z2591C98B70119FE6248Z198B1E4 之间共享值 - sharing values among files Dockerfile, docker-compose.yml, python.py, and shell 什么是运行 python 脚本的基本 Dockerfile/docker-compose.yml(使用特定版本的 python/包) - what is a bare-bones Dockerfile/docker-compose.yml to run python scripts (with specific versions of python/packages) 设置 docker-compose.yml 以运行 celery worker 和 celery beat 以 redis 作为代理的 django 项目 - Setting up docker-compose.yml to run celery worker and celery beat for a django project with redis as broker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM