Repository navigation
New command to start SPFx container matching the project version #3166
Replies: 10 comments 33 replies
|
@pnp/cli-for-microsoft-365-maintainers @hugoabernier @shurick81 @DonKirkham any opinions? |
|
I like the idea! My two cents' worth:
graph TD
A[CLI docker start] --> B(Look for existing container)
B --> C{Existing container?}
C -->|Yes| D[Launch container]
C -->|No| E[Run CLI new container #3098 ]
E --> |Container created|D
|
|
After watching the demo today in the Community call by @shurick81, it would be nice to have the option to include a repo url in the command, eliminating the need to clone the repo locally. Of course, if you are working with a local repo, using the current folder could be the default if no repo url is included. |
|
Will it also work if we use CLI in Docker? |
|
I totally get the value of such a use case. However, I'm struggling to find reasons why this feature should belongs to "CLI for M365"... Would not it be great instead to have a feature in spfx like |
|
One more question, in case if we do this feature, should it determine the docker image based on the package.json or should it also look at .devcontainer? The latter could help in case a developer is not using using IDE that is not aware of .devcontainer, right? I think we could try understand the biggest problem that developers now have. Is that a problem that spfx developers do not know how to start using docker? |
|
I wonder if there are similar patterns for other domains, that are not SPFx related, what is the common practice in the community of Docker users regarding simplifying running docker containers? I's just one line command after all :) |
|
Do I understand it correctly that the alternative that SPFx developers have currently, without this new feature, is that someone from their team prepares a guidance for each project, how to run it in Docker, right? Something like this? https://github.com/shurick81/spfx-demo-01 |
I'm on a mac
Correct, we won't be installing prerequisites and we'd draw the line at starting the container
Potentially, although it's tricky to automatically change something in the code in a reliable way |
|
If Docker is not installed, it should just output the info about this, right? |
Uh oh!
There was an error while loading. Please reload this page.
What do you think about adding a command like
spfx project docker start(orspfx docker start?) that would detect the version of the current SPFx project and run the command to start the corresponding Docker container?This command would simplify looking up the command to run the container and would automatically include mapping ports, mounting the volume, etc.
All reactions