Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Add container:run command #29

Merged
merged 1 commit into from
Jan 2, 2018
Merged

Add container:run command #29

merged 1 commit into from
Jan 2, 2018

Conversation

dmathieu
Copy link

@dmathieu dmathieu commented Dec 8, 2017

We may want to change the syntax a bit.
Closes /issues/28

@dmathieu dmathieu requested a review from a team December 8, 2017 09:49
README.md Outdated
@@ -13,6 +13,7 @@ $ heroku plugins:install heroku-container-registry
In a directory with a Dockerfile:

```
$ heroku container:run web
Copy link
Member

Choose a reason for hiding this comment

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

I would maybe keep the readme focused on the minimal thing to deploy.

commands/run.js Outdated
{
name: 'arg',
hasValue: true,
description: 'set build-time variables'
Copy link
Member

Choose a reason for hiding this comment

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

I think we should decouple these commands (and remove this flag). It's not great that all commands need to know about building images.

Copy link
Author

Choose a reason for hiding this comment

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

You mean have a container:build command and not run here (nor in push) anymore?

Copy link
Member

Choose a reason for hiding this comment

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

Yes. We probably need to keep it part of the push command for compatibility but I think we should separate it for new commands (and eventually for the push command too).

commands/run.js Outdated
jobs = possibleJobs.standard || []
}
if (!jobs.length) {
cli.warn('No images to push')
Copy link
Member

Choose a reason for hiding this comment

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

"to run"?

commands/run.js Outdated

let jobs = []
if (possibleJobs.standard) {
possibleJobs.standard.forEach((pj) => { pj.resource = pj.resource.replace(/standard$/, processType)})
Copy link
Member

Choose a reason for hiding this comment

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

Where does "standard" come from?

Copy link
Author

Choose a reason for hiding this comment

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

I have no idea. Looks like it's an array method. I've taken this from the push command.

Copy link
Member

Choose a reason for hiding this comment

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

I was curious about resource.replace(/standard$/, processType) specifically.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe it's copied from another place there too? Can we remove it?

Copy link
Author

Choose a reason for hiding this comment

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

@heroku/cli any idea about this?

Copy link
Contributor

Choose a reason for hiding this comment

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

no idea. I looked at the code and it seems that it never gets set from what I can tell.

Copy link
Author

Choose a reason for hiding this comment

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

standard come from here.
The lib detects the process name part of Dockerfile.web, and defaults to standard if there is nothing.
Maybe this should be renamed to default to be clearer.

Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't "web" be better as that's the default process type?

Copy link
Author

Choose a reason for hiding this comment

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

web works for me. I'll change it.

@dmathieu dmathieu merged commit b1f4248 into master Jan 2, 2018
@dmathieu dmathieu deleted the run branch January 2, 2018 09:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants