---
title: "Comment by János Nagy on \"How Docker containers eliminate SPFx environment setup\" | Hashnode"
description: "Hi! Thanks for the great article. I tried but ultimately failed to convert your solution to SharePoint 2019 on-premises. Should you have time, could you publish"
url: "https://hashnode.com/posts/how-docker-containers-eliminate-spfx-environment-setup/620fc2628f26523301cb51df/comment/6351039bb58387b1b77250cf"
---

[Discussion](https://hashnode.com/posts/how-docker-containers-eliminate-spfx-environment-setup/620fc2628f26523301cb51df)

Comment [How Docker containers eliminate SPFx environment setup](https://hashnode.com/posts/how-docker-containers-eliminate-spfx-environment-setup/620fc2628f26523301cb51df)

[János Nagy](https://hashnode.com/@Yanitzar)

[Oct 20, 2022](https://hashnode.com/posts/how-docker-containers-eliminate-spfx-environment-setup/620fc2628f26523301cb51df/comment/6351039bb58387b1b77250cf)

Hi! Thanks for the great article. I tried but ultimately failed to convert your solution to SharePoint 2019 on-premises. Should you have time, could you publish a docker file that works with SPFx 1.4.1 and includes the fast serve package? Thanks a lot!

[$€®¥09@](https://hashnode.com/@Seryoga)

[Oct 21, 2022](https://hashnode.com/posts/how-docker-containers-eliminate-spfx-environment-setup/620fc2628f26523301cb51df/comment/6351039bb58387b1b77250cf#reply-6352745a4143cfc299771cde)

Hi [János Nagy](https://hashnode.com/@Yanitzar) thank you for the comment. Yesterday I wanted to (quickly) deploy SPFx version 1.12.1 (last version supporting SP2019) as a Docker image and as alpine version. Unfortunately, there were some problems with the permissions, so that an `npm i` resulted in errors. When I have a bit more time, I will take a closer look. In the meantime, you can use the official Docker image version 1.12.1 (`docker pull m365pnp/spfx:1.12.1`) and install spfx-fast-serve manually (or modify the Dockerfile and add spfx-fast-serve).

For example:

```
FROM node:14.17.0

EXPOSE 5432 4321 35729

ENV NPM_CONFIG_PREFIX=/usr/app/.npm-global \
  PATH=$PATH:/usr/app/.npm-global/bin

VOLUME /usr/app/spfx
WORKDIR /usr/app/spfx
RUN useradd --create-home --shell /bin/bash spfx && \
    usermod -aG sudo spfx && \
    chown -R spfx:spfx /usr/app

USER spfx

RUN npm i -g gulp@4 yo @microsoft/generator-sharepoint@1.12.1 spfx-fast-serve

CMD /bin/bash
```
