Skip to content

StfBauer/docker-spfx-pnp-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

SharePoint Framework Office PNP Docker file

Docker images recipe for running SharePoint Framework Pattern and Practices samples.

Usage

In the HOSTS file on your host add:

127.0.0.1    spfx

Clone this repository

git clone https://github.com/StfBauer/docker-spfx-pnp-samples.git

Create docker image for SPFX Pattern and Practices sample

Create docker image specific to one of the sample listed on SPFX PnP Samples
For example create container for jquery-cdn sample pass in the following command:

docker build -t spfx-samples:jquery-cdn . --build-arg samplename="jquery-cdn"  

Pass in folder name to image name and tag 'spfx-samples:'.
Set 'samplename' build argument to same folder name.

To run container

docker run -h spfx --name spfx-jquery-cdn -it -p 5432:5432 -p 4321:4321 -p 35729:35729 spfx-samples:jquery-cdn

Set --name argument to your desired name. In this case spfx-jquery-cdn was used.
To exit container press CTRL+C this will exit the container.

To restart container again:

docker start spfx-jquery-cdn

To access running container via shell

docker exec -it spfx-jquery-cdn /bin/bash

Additional information

Additional information can be found in my blog post "How to run SharePoint Framework Pattern and Practices Samples through Docker"

Known issues

There are some know issues on Windows documented on Dockers Github page.

Limitations

Windows 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.

Releases

No releases published

Packages

No packages published

Languages