{"id":26820072,"url":"https://github.com/waldekmastykarz/docker-spfx","last_synced_at":"2025-03-30T06:02:00.564Z","repository":{"id":38832433,"uuid":"70315455","full_name":"pnp/docker-spfx","owner":"pnp","description":"Docker images for working with SharePoint Framework","archived":false,"fork":false,"pushed_at":"2025-02-03T07:57:47.000Z","size":294,"stargazers_count":120,"open_issues_count":0,"forks_count":50,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-28T19:08:02.839Z","etag":null,"topics":["docker","docker-image","microsoft-365","microsoft-teams","microsoft-viva","office-365","sharepoint","sharepoint-2016","sharepoint-framework","sharepoint-online","spfx"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/m365pnp/spfx","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pnp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-08T08:11:43.000Z","updated_at":"2025-02-07T03:21:17.000Z","dependencies_parsed_at":"2025-02-23T18:13:02.734Z","dependency_job_id":"d46122ab-6a54-4152-a8da-b2354d53c49e","html_url":"https://github.com/pnp/docker-spfx","commit_stats":null,"previous_names":["waldekmastykarz/docker-spfx"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnp%2Fdocker-spfx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnp%2Fdocker-spfx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnp%2Fdocker-spfx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnp%2Fdocker-spfx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pnp","download_url":"https://codeload.github.com/pnp/docker-spfx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246281280,"owners_count":20752212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","microsoft-365","microsoft-teams","microsoft-viva","office-365","sharepoint","sharepoint-2016","sharepoint-framework","sharepoint-online","spfx"],"created_at":"2025-03-30T06:01:45.469Z","updated_at":"2025-03-30T06:02:00.551Z","avatar_url":"https://github.com/pnp.png","language":"Dockerfile","funding_links":[],"categories":["Tools"],"sub_categories":["Samples"],"readme":"# SharePoint Framework Docker images\n\nDocker images for running [SharePoint Framework](https://github.com/SharePoint/sp-dev-docs).\n\n\n[![Pulls from Docker Hub](https://img.shields.io/docker/pulls/m365pnp/spfx.svg)](https://hub.docker.com/r/m365pnp/spfx)\n[![Stars on Docker Hub](https://img.shields.io/docker/stars/m365pnp/spfx.svg)](https://hub.docker.com/r/m365pnp/spfx)\n\n## Usage\n\n- in **Docker Settings \u003e Shared Drives** verify that the drive where you create your projects is shared\n- Create a folder for your SharePoint Framework project\n- In the command line (on macOS):\n\n```sh\ncd [your project]\ndocker run -it --rm --name ${PWD##*/} -v $PWD:/usr/app/spfx -p 4321:4321 -p 35729:35729 m365pnp/spfx\n```\n\n- In PowerShell on Windows:\n\n```PowerShell\ncd [your project]\ndocker run -it --rm --name spfx-helloworld -v ${PWD}:/usr/app/spfx -p 4321:4321 -p 35729:35729 m365pnp/spfx\n```\n\n- In other shells on Windows\n\n```cmd\ncd [your project]\ndocker run -it --rm --name spfx-helloworld -v %cd%:/usr/app/spfx -p 4321:4321 -p 35729:35729 m365pnp/spfx\n```\n\nAfter the container started you can work with it the same way you would work with SharePoint Framework installed on your host. To create a new SharePoint Framework project in the container command line execute:\n\n```sh\nyo @microsoft/sharepoint\n```\n\nAll files scaffolded by the generator will be stored in your project directory on your host from where you can commit them to source control.\n\nTo close the container in the container command line run:\n\n```sh\nexit\n```\n\nYou can also use this image for [Visual Studio development containers](./DevelopmentContainers.md)\n\n## Available tags\n\n- **latest**: contains the SharePoint Framework Yeoman generator from the [1.20.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.20.0?WT.mc_id=m365-0000-wmastyka) release\n- **online**: contains the SharePoint Framework Yeoman generator from the [1.20.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.20.0?WT.mc_id=m365-0000-wmastyka) release\n- **onprem**: contains the SharePoint Framework Yeoman generator from the [1.4.1](https://github.com/sharepoint/sp-dev-docs/wiki/Release-Notes-for-SPFx-Package-Version-1.4.1) release\n- **1.20.0**: contains the SharePoint Framework Yeoman generator from the [1.20.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.20.0?WT.mc_id=m365-0000-wmastyka) release\n- **1.19.0**: contains the SharePoint Framework Yeoman generator from the [1.19.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.19.0?WT.mc_id=m365-0000-wmastyka) release\n- **1.18.2**: contains the SharePoint Framework Yeoman generator from the [1.18.2](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.18.2?WT.mc_id=m365-0000-wmastyka) release\n- **1.18.1**: contains the SharePoint Framework Yeoman generator from the [1.18.1](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.18.1?WT.mc_id=m365-0000-wmastyka) release\n- **1.18.0**: contains the SharePoint Framework Yeoman generator from the [1.18.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.18.0?WT.mc_id=m365-0000-wmastyka) release\n- **1.17.4**: contains the SharePoint Framework Yeoman generator from the [1.17.4](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.17.4?WT.mc_id=m365-0000-wmastyka) release\n- **1.17.3**: contains the SharePoint Framework Yeoman generator from the [1.17.3](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.17.3?WT.mc_id=m365-0000-wmastyka) release\n- **1.17.2**: contains the SharePoint Framework Yeoman generator from the [1.17.2](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.17.2?WT.mc_id=m365-0000-wmastyka) release\n- **1.17.1**: contains the SharePoint Framework Yeoman generator from the [1.17.1](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.17.1?WT.mc_id=m365-0000-wmastyka) release\n- **1.17.0**: contains the SharePoint Framework Yeoman generator from the [1.17.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.17?WT.mc_id=m365-0000-wmastyka) release\n- **1.16.1**: contains the SharePoint Framework Yeoman generator from the [1.16.1](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.16.1?WT.mc_id=m365-0000-wmastyka) release\n- **1.16.0**: contains the SharePoint Framework Yeoman generator from the [1.16.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.16?WT.mc_id=m365-0000-wmastyka) release\n- **1.15.2**: contains the SharePoint Framework Yeoman generator from the [1.15.2](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.15.2?WT.mc_id=m365-0000-wmastyka) release\n- **1.15.0**: contains the SharePoint Framework Yeoman generator from the [1.15.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.15?WT.mc_id=m365-0000-wmastyka) release\n- **1.14.0**: contains the SharePoint Framework Yeoman generator from the [1.14.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.14?WT.mc_id=m365-0000-wmastyka) release\n- **1.13.1**: contains the SharePoint Framework Yeoman generator from the [1.13.1](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.13.1?WT.mc_id=m365-0000-wmastyka) release\n- **1.13.0**: contains the SharePoint Framework Yeoman generator from the [1.13.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.13?WT.mc_id=m365-0000-wmastyka) release\n- **1.12.1**: contains the SharePoint Framework Yeoman generator from the [1.12.1](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.12.1?WT.mc_id=m365-0000-wmastyka) release\n- **1.12.0**: contains the SharePoint Framework Yeoman generator from the [1.12.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.12.0?WT.mc_id=m365-0000-wmastyka) release\n- **1.11.0**: contains the SharePoint Framework Yeoman generator from the [1.11.0](https://docs.microsoft.com/sharepoint/dev/spfx/release-1.11.0?WT.mc_id=m365-0000-wmastyka) release\n- **1.10.0**: contains the SharePoint Framework Yeoman generator from the [1.10.0](https://github.com/sharepoint/sp-dev-docs/wiki/SharePoint-Framework-v1.10-release-notes) release\n- **1.9.1**: contains the SharePoint Framework Yeoman generator from the [1.9.1](https://github.com/sharepoint/sp-dev-docs/wiki/SharePoint-Framework-v1.9.1-release-notes) release\n- **1.8.2**: contains the SharePoint Framework Yeoman generator from the [1.8.2](https://github.com/sharepoint/sp-dev-docs/wiki/SharePoint-Framework-v1.8.2-release-notes) release\n- **1.8.1**: contains the SharePoint Framework Yeoman generator from the [1.8.1](https://github.com/sharepoint/sp-dev-docs/wiki/SharePoint-Framework-v1.8.1-release-notes) release\n- **1.8.0**: contains the SharePoint Framework Yeoman generator from the [1.8.0](https://github.com/sharepoint/sp-dev-docs/wiki/SharePoint-Framework-v1.8-release-notes) release\n- **1.7.1**: contains the SharePoint Framework Yeoman generator from the [1.7.1](https://github.com/sharepoint/sp-dev-docs/wiki/Release-Notes-for-SPFx-Package-Version-1.7.1) release\n- **1.7.0**: contains the SharePoint Framework Yeoman generator from the [1.7.0](https://github.com/SharePoint/sp-dev-docs/wiki/SharePoint-Framework-v1.7-release-notes) release\n- **1.6.0**: contains the SharePoint Framework Yeoman generator from the [1.6.0](https://github.com/sharepoint/sp-dev-docs/wiki/v-1.6-release-notes) release\n- **1.5.1**: contains the SharePoint Framework Yeoman generator from the [1.5.1](https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-for-SPFx-Package-Version-1.5.1) release\n- **1.5.0**: contains the SharePoint Framework Yeoman generator from the [1.5.0](https://github.com/sharepoint/sp-dev-docs/wiki/Release-Notes-for-SharePoint-Framework-Package-v1.5) release\n- **1.4.1**: contains the SharePoint Framework Yeoman generator from the [1.4.1](https://github.com/sharepoint/sp-dev-docs/wiki/Release-Notes-for-SPFx-Package-Version-1.4.1) release\n- **1.4.0**: contains the SharePoint Framework Yeoman generator from the [1.4.0](https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-for-SPFx-Package-Version-1.4) release\n- **1.3.4**: contains the SharePoint Framework Yeoman generator from the [1.3.4](https://dev.office.com/blogs/improved-support-for-office-ui-fabric-core) release\n- **1.3.2**: contains the SharePoint Framework Yeoman generator from the 1.3.2 release\n- **1.3.1**: contains the SharePoint Framework Yeoman generator from the 1.3.1 release\n- **1.3.0**: contains the SharePoint Framework Yeoman generator from the 1.3.0 release\n- **1.2.0**: contains the SharePoint Framework Yeoman generator from the [1.2.0](https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes---Extensions-RC-Drop-1.2) release\n- **1.1.3**: contains the SharePoint Framework Yeoman generator from the 1.1.3 release\n- **1.1.1**: contains the SharePoint Framework Yeoman generator from the [1.1.1](https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes---Extensions-Dev-Preview-Drop-1) release\n- **1.1.0**: contains the SharePoint Framework Yeoman generator from the [1.1.0](https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes---Extensions-Dev-Preview-Drop-1) release\n- **1.0.2**: contains the SharePoint Framework Yeoman generator from the 1.0.2 release\n- **ga**: contains the SharePoint Framework Yeoman generator from the [GA](https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-GA) release\n- **rc0**: contains the SharePoint Framework Yeoman generator from the [RC0](https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-RC0) release\n- **drop-6**: contains the SharePoint Framework Yeoman generator from the [developer preview drop 6](https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-Drop-6)\n- **drop-5**: contains the SharePoint Framework Yeoman generator from the [developer preview drop 5](https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-Drop-5)\n- **drop-4**: contains the SharePoint Framework Yeoman generator from the [developer preview drop 4](https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-Drop-4-and-MDL2)\n\n## Known issues\n\n### Unable to write files to disk\n\nWhen running `yo @microsoft/sharepoint` you get an error that the container is unable to write files to the disk. In most cases this is caused by the drive not being shared in Docker. Go to Docker \u003e Settings \u003e Sharing to enable sharing the drive where your project is located.\n\n### Can't access workbench and bundles in SharePoint Framework \u003e=1.14.0\n\nWhen using the container with SharePoint Framework \u003e=v1.14.0, you can't access the local workbench or can't load bundles in the hosted workbench. This is caused by the default mapping of the workbench to localhost, which isn't accessible outside of the container. To fix it, map the workbench to `0.0.0.0`, by modifying the `./config/serve.json` file in your SharePoint Framework project to:\n\n```json\n{\n  \"$schema\": \"https://developer.microsoft.com/json-schemas/core-build/serve.schema.json\",\n  \"port\": 4321,\n  \"ipAddress\": \"0.0.0.0\",\n  \"https\": true,\n  \"initialPage\": \"https://enter-your-SharePoint-site/_layouts/workbench.aspx\"\n}\n```\n\n### Can't access workbench and bundles in SharePoint Framework \u003e=1.6.0 \u003c=1.13.1\n\nWhen using the container with SharePoint Framework \u003e=v1.6.0, you can't access the local workbench or can't load bundles in the hosted workbench. This is caused by the default mapping of the workbench to localhost, which isn't accessible outside of the container. To fix it, map the workbench to `0.0.0.0`, by modifying the `./config/serve.json` file in your SharePoint Framework project to:\n\n```json\n{\n  \"$schema\": \"https://developer.microsoft.com/json-schemas/core-build/serve.schema.json\",\n  \"port\": 4321,\n  \"hostname\": \"0.0.0.0\",\n  \"https\": true,\n  \"initialPage\": \"https://enter-your-SharePoint-site/_layouts/workbench.aspx\"\n}\n```\n\n### Can't access bundles in SharePoint Framework 1.13.1\n\nModify `node_modules\\@microsoft\\spfx-heft-plugins\\lib\\plugins\\webpackConfigurationPlugin\\WebpackConfigurationGenerator.js:393`\n\n```javascript\nconst debugBaseUrl = `${serveConfig.https ? 'https' : 'http'}://${serveConfig.hostname || 'localhost'}:${serveConfig.port || 4321}/${distFolderName}/`;\n```\n\nto:\n\n```javascript\nconst debugBaseUrl = `${serveConfig.https ? 'https' : 'http'}://localhost:${serveConfig.port || 4321}/${distFolderName}/`;\n```\n\n### Can't access bundles in SharePoint Framework 1.12.1\n\nModify `node_modules\\@microsoft\\spfx-heft-plugins\\lib\\plugins\\webpackConfigurationPlugin\\WebpackConfigurationGenerator.js:376`\n\n```javascript\nconst debugBaseUrl = `${serveConfig.https ? 'https' : 'http'}://${serveConfig.hostname || 'localhost'}:${serveConfig.port || 4321}/dist/`;\n```\n\nto:\n\n```javascript\nconst debugBaseUrl = `${serveConfig.https ? 'https' : 'http'}://localhost:${serveConfig.port || 4321}/dist/`;\n```\n\n### Can't access workbench and bundles in SharePoint Framework \u003e=1.6.0 \u003c=1.11.0 on Windows\n\nWhen using the container with SharePoint Framework \u003e=v1.6.0 on Windows, you can't access the local workbench despite following the steps from the previous section. This has to do with Windows being unable to correctly access 0.0.0.0. To fix it, first, modify `config\\write-manifests.json` to (add the `debugBasePath` property):\n\n```json\n{\n  \"$schema\": \"https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json\",\n  \"cdnBasePath\": \"\u003c!-- PATH TO CDN --\u003e\",\n  \"debugBasePath\": \"https://localhost:4321/\"\n}\n```\n\nThen, open `node_modules\\@microsoft\\sp-build-web\\lib\\SPWebBuildRig.js` and change lines from:\n\n```js\nspBuildCoreTasks.writeManifests.mergeConfig({\n    debugBasePath: `${serve.taskConfig.https ? 'https' : 'http'}://${serve.taskConfig.hostname}:${serve.taskConfig.port}/`\n});\n```\n\nto (add the `if` statement):\n\n```js\nif (!spBuildCoreTasks.writeManifests.taskConfig.debugBasePath) {\n    spBuildCoreTasks.writeManifests.mergeConfig({\n        debugBasePath: `${serve.taskConfig.https ? 'https' : 'http'}://${serve.taskConfig.hostname}:${serve.taskConfig.port}/`\n    });\n}\n```\n\nDepending on the SPFx version the lines to replace are different:\n\n| SPFx version | SPWebBuildRig.js lines to replace |\n| ------------- | ------------- |\n| 1.6.0, 1.7.0 or 1.7.1 | 83-85 |\n| 1.8.0, 1.8.1 or 1.8.2 | 88-90 |\n| 1.9.1 | 92-94 |\n| 1.10.0 or 1.11.0 | 96-98 |\n\n### Can't access workbench and bundles in SharePoint Framework 1.5.0\n\nWhen using the container with SharePoint Framework v1.5.0, you can't access the local workbench or can't load bundles in the hosted workbench. This is caused by a change to the `gulp-connect` package used by the `gulp serve` task. To fix the issue, after scaffolding the project, in the code editor open the `./node_modules/gulp-connect/index.js` file and change line 106 from:\n\n```js\nreturn this.server.listen(this.port, this.host, (function(_this) {\n```\n\nto (remove the `this.host` argument):\n\n```js\nreturn this.server.listen(this.port, (function(_this) {\n```\n\n## Limitations\n\nWindows 10 Anniversary Update and Windows Server 2016 have native support for containers. At this moment Windows supports only containers built on Windows Server Core or Nano Server and you won't be able to run this container natively on Windows. Instead you should use Docker for Windows or Docker Toolbox.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaldekmastykarz%2Fdocker-spfx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaldekmastykarz%2Fdocker-spfx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaldekmastykarz%2Fdocker-spfx/lists"}