Skip to content
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

Update --dockerfile option description to state docker-compose is supported #1945

Closed
wants to merge 1 commit into from

Conversation

phil-d-wilson
Copy link

Change-type: patch
Signed-off-by: Phil Wilson [email protected]

@phil-d-wilson phil-d-wilson requested a review from a team as a code owner July 14, 2020 13:48
@@ -187,7 +187,7 @@ export const push: CommandDefinition<
signature: 'dockerfile',
parameter: 'Dockerfile',
description:
'Alternative Dockerfile name/path, relative to the source folder',
'Alternative Dockerfile (or docker-compose file) name/path, relative to the source folder',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. Is that true though? :-) I was under the impression that the CLI did not allow specifying an alternative docker-compose file. Did you test, did it work? Here's what I just got:

$ balena push 192.168.0.37 -s ~/balena/other/simple_multicontainer --dockerfile my-docker-compose.yml
[Info]    Starting build on device 192.168.0.37
[Info]    No "docker-compose.yml" file found at "/Users/paulo/balena/other/simple_multicontainer"
[Info]    Creating default composition with source: "/Users/paulo/balena/other/simple_multicontainer"
...
Some services failed to build:
	main: (HTTP code 400) unexpected - Dockerfile parse error line 1: unknown instruction: VERSION:

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I did:

❯ balena push balena-dash --dockerfile .\docker-compose3.yml
Error: specified Dockerfile not found:
Specified dockerfile: "docker-compose3.yml"
Project's source folder: "."
Note that the specified Dockerfile path should be relative to the source folder.

ExpectedError: Error: specified Dockerfile not found:

⨯ phil@DESKTOP-7SPOFOE  ~\OneDrive\Documents\Source\balenaDash   BaseImageTest ≢ +3 ~1 -36 !                                                                                                        [13:33]
❯ balena push balena-dash --dockerfile .\docker-compose2.yml
- Packaging the project source...[Warn]    CRLF (Windows) line endings detected in file: C:\Users\phil\OneDrive\Documents\Source\balenaDash\.git\gitk.cache
- Uploading source package to balena cloud

I made a version 2 which worked, and tried specifying a file that did not exist (3).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⨯ phil@DESKTOP-7SPOFOE  ~\OneDrive\Documents\Source\balenaDash   BaseImageTest ≢ +3 ~1 -36 !                                                                                                        [14:57]
❯ balena version
11.32.16

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah....no it doesn't. I still had my original docker-compose.yml in place, and it was picking up that. It just ignores the option if it finds your compose. :-(

That's a real shame, as I just told a user it worked. :-(

Copy link
Contributor

@pdcastro pdcastro Jul 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even so, it's puzzling that it did not complain about the contents of the Dockerfile -- perhaps the original docker-compose.yml file was pointing to a different Dockerfile, or not requiring one (image instruction).
There is a CLI issue for alternative docker-compose file names to be implemented: #1142

Edit: it's not really that puzzling, thinking about it; :-) but the CLI should have complained that the --dockerfile option was being ignored.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It definitely should complain.

@Page- Page- deleted the Update-push-dockerfile-option-desc branch November 5, 2021 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants