-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow to use the COMPOSE_FILE variable in finch compose (#994)
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 <[email protected]>
- Loading branch information
Showing
6 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.