-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot specify compose file with environment variable #347
Labels
bug
Something isn't working
Comments
haytok
added a commit
to haytok/finch
that referenced
this issue
Jun 23, 2024
nerdctl allows us to launch containers using a Docker Compose file specified in the COMPOSE_FILE environment variable. For example, suppose we have created the following Docker Compose file. ``` > cat a.yaml services: test: image: amazonlinux:2023 ``` By specifying this Docker Compose file in the COMPOSE_FILE environment variable and running nerdctl compose up, we can start the container. ``` > sudo COMPOSE_FILE=a.yaml _output/nerdctl compose up INFO[0000] Ensuring image amazonlinux:2023 INFO[0000] Re-creating container nerdctl-test-1 INFO[0000] Attaching to logs INFO[0000] Container "nerdctl-test-1" exited INFO[0000] All the containers have exited INFO[0000] Stopping containers (forcibly) INFO[0000] Stopping container nerdctl-test-1 ``` However, since the COMPOSE_FILE environment variable is not passed in finch compose, the following error occurs. ``` > COMPOSE_FILE=a.yaml finch compose up FATA[0000] no configuration file provided: not found FATA[0000] exit status 1 ``` And this bug is reported in the following issue. - runfinch#347 Therefore, this fix allows the finch compose command to use the Docker Compose file specified in the COMPOSE_FILE environment variable. Signed-off-by: Hayato Kiwata <haytok@amazon.co.jp>
1 task
haytok
added a commit
to haytok/finch
that referenced
this issue
Jun 27, 2024
nerdctl allows us to launch containers using a Docker Compose file specified in the COMPOSE_FILE environment variable. For example, suppose we have created the following Docker Compose file. ``` > cat a.yaml services: test: image: amazonlinux:2023 ``` By specifying this Docker Compose file in the COMPOSE_FILE environment variable and running nerdctl compose up, we can start the container. ``` > sudo COMPOSE_FILE=a.yaml _output/nerdctl compose up INFO[0000] Ensuring image amazonlinux:2023 INFO[0000] Re-creating container nerdctl-test-1 INFO[0000] Attaching to logs INFO[0000] Container "nerdctl-test-1" exited INFO[0000] All the containers have exited INFO[0000] Stopping containers (forcibly) INFO[0000] Stopping container nerdctl-test-1 ``` However, since the COMPOSE_FILE environment variable is not passed in finch compose, the following error occurs. ``` > COMPOSE_FILE=a.yaml finch compose up FATA[0000] no configuration file provided: not found FATA[0000] exit status 1 ``` And this bug is reported in the following issue. - runfinch#347 Therefore, this fix allows the finch compose command to use the Docker Compose file specified in the COMPOSE_FILE environment variable. Signed-off-by: Hayato Kiwata <haytok@amazon.co.jp>
haytok
added a commit
that referenced
this issue
Jun 28, 2024
nerdctl allows us to launch containers using a Docker Compose file specified in the COMPOSE_FILE environment variable. For example, suppose we have created the following Docker Compose file. ``` > cat a.yaml services: test: image: amazonlinux:2023 ``` By specifying this Docker Compose file in the COMPOSE_FILE environment variable and running nerdctl compose up, we can start the container. ``` > sudo COMPOSE_FILE=a.yaml _output/nerdctl compose up INFO[0000] Ensuring image amazonlinux:2023 INFO[0000] Re-creating container nerdctl-test-1 INFO[0000] Attaching to logs INFO[0000] Container "nerdctl-test-1" exited INFO[0000] All the containers have exited INFO[0000] Stopping containers (forcibly) INFO[0000] Stopping container nerdctl-test-1 ``` However, since the COMPOSE_FILE environment variable is not passed in finch compose, the following error occurs. ``` > COMPOSE_FILE=a.yaml finch compose up FATA[0000] no configuration file provided: not found FATA[0000] exit status 1 ``` And this bug is reported in the following issue. - #347 Therefore, this fix allows the finch compose command to use the Docker Compose file specified in the COMPOSE_FILE environment variable. Issue #, if available: #347 *Description of changes:* The details are described in this commit message. *Testing done:* Yes - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Signed-off-by: Hayato Kiwata <haytok@amazon.co.jp>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If I specify the
COMPOSE_FILE
environment variable in my local shell, it will be ignored by Finch when searching for compose files. The variable is not shared with the Finch VM.Steps to reproduce
Expected behavior
Finch should be able to find the compose file specified in the
COMPOSE_FILE
env variable.https://docs.docker.com/compose/environment-variables/envvars/#compose_file
The text was updated successfully, but these errors were encountered: