Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Align docker app with docker run UX #681

Merged
merged 3 commits into from Oct 14, 2019
Merged

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Oct 11, 2019

- What I did
Renamed install/deploy command to "run" to align with docker run UX

- How I did it
refactor > rename

- How to verify it
docker app --help
docker app run myapp

- Description for the changelog
deploy command has been renamed run to align with docker run UX

- A picture of a cute animal (not mandatory but encouraged)
image

@rumpl
Copy link
Member

rumpl commented Oct 11, 2019

Could you rename internal/commands/install.go to run.go?

@codecov
Copy link

codecov bot commented Oct 11, 2019

Codecov Report

Merging #681 into master will decrease coverage by 0.5%.
The diff coverage is 74.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #681      +/-   ##
==========================================
- Coverage   72.29%   71.78%   -0.51%     
==========================================
  Files          58       56       -2     
  Lines        3140     2889     -251     
==========================================
- Hits         2270     2074     -196     
+ Misses        581      551      -30     
+ Partials      289      264      -25
Impacted Files Coverage Δ
internal/commands/image/list.go 81.81% <100%> (ø) ⬆️
internal/commands/build/build.go 61.66% <100%> (-4.39%) ⬇️
internal/commands/image/tag.go 89.18% <100%> (-0.56%) ⬇️
internal/commands/inspect.go 69.23% <100%> (ø) ⬆️
internal/packager/bundle.go 64% <33.33%> (-3.25%) ⬇️
internal/store/bundle.go 68.62% <64.7%> (-5.48%) ⬇️
internal/commands/image/rm.go 61.29% <66.66%> (-2.35%) ⬇️
internal/commands/cnab.go 71.36% <66.66%> (-4.51%) ⬇️
internal/store/digest.go 83.33% <83.33%> (ø) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58e773c...f0cd91c. Read the comment docs.

@ndeloof ndeloof marked this pull request as ready for review October 11, 2019 08:43
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
app can only be ran from an image built by docker app build

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM + tests ok 👌

Long: longDescription,
Example: example,
Args: cli.RequiresMaxArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
return runInstall(dockerCli, firstOrEmpty(args), opts)
return runRun(dockerCli, firstOrEmpty(args), opts)
Copy link
Contributor

Choose a reason for hiding this comment

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

runRun! 🏃

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't be firstOrEmpty(args) I think right? Now the command needs the app image reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mayeb I should rename RunForestRun ?

Copy link
Contributor

Choose a reason for hiding this comment

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

or RunLolaRun?

Aliases: []string{"deploy"},
Short: "Install an application",
Short: "Run an application",
Long: longDescription,
Example: example,
Args: cli.RequiresMaxArgs(1),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be ExactArgs(1) ?


cmd := &cobra.Command{
Use: "install [APP_NAME] [--name INSTALLATION_NAME] [--target-context TARGET_CONTEXT] [OPTIONS]",
Use: "run [APP_NAME] [--name INSTALLATION_NAME] [--target-context TARGET_CONTEXT] [OPTIONS]",
Copy link
Contributor

Choose a reason for hiding this comment

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

Use: "run [OPTIONS] APP_IMAGE" ? To better fit docker run synopsis ?

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

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

LGTM

@silvin-lubecki silvin-lubecki merged commit fc64d21 into docker:master Oct 14, 2019
@ndeloof ndeloof deleted the run branch October 14, 2019 13:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants