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? |
Beta Was this translation helpful? Give feedback.
-
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
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Will it also work if we use CLI in Docker?
|
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
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 :) |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
If Docker is not installed, it should just output the info about this, right? |
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions