user2063: I'm trying to run the Plutus Pioneer code on a Docker container based on https://hub.docker.com/r/nixos/nix.
I've followed this guide to install Cabal and GHC https://www.reddit.com/r/haskell/comments/dg4dvs/install_ghc_in_25mins_or_ghcjs_in_one_sleep_with/
I haven't been able to get GHCJS installed, though I'm not sure if it is necessary.
Is there any guide on pre-requisites for the Plutus Pioneer Program, ideally with install instructions?

user2201: I am running the Plutus Pioneer code in a nixos/nix based Docker container and it works a treat. I use the nix-shell as recommended in the pioneer program repo and I only needed to set up the IOHK binary caches and install git (using nix) as a prerequisite. I added curl and tmux to make it more user friendly. I use tmux to set up a three pane session containing the Plutus server, the playground GUI and one for interactive cabal. Below is the contents of the Dockerfile I use to buid the image.
FROM nixos/nix

RUN echo "substituters        = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/" >> /etc/nix/nix.conf && \
    echo "trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" >> /etc/nix/nix.conf && \
    nix-env --install git && \
    nix-env --install curl && \
    nix-env --install tmux

It is important to map the /nix folder to a data volume for better performance and to keep the size of the running container down. This folder can easily contain a few tens of Gb of data.
I keep the Plutus and Pioneer code repos on the host and map a data volume to bring it into the container:
docker run -it -p 8009:8009 -v hkvb_nixos_plutus:/nix -v $(pwd):/plutus hkvb/nixos.plutus:original sh

This command only exposes the port of the Playground UI. The hkvb/nixos.plutus image was built using the Dockerfile above and is available on Docker Hub.
There is one minor change required in the Plutus code to make the playground accessible from outside the container. This is in the webpack.config.js file of the plutus-playground-client. THe DevServer is only bound to the localhost network interface (of the container). Adding the line
host: "0.0.0.0",

makes the server available external to the container.
[UPDATE 08/08/2021]
I have found out that it is best to start from a freshly cloned (or new copy) of the Plutus repository when changing commits for build. Changing commit on a Plutus repository that was already used for a build often resulted in problems for me, often leading to never ending builds, especially when building the documentation.

user1142: There are instructions on the official input-output-hk/plutus-pioneer-program repo in the exercises chapter here: https://github.com/input-output-hk/plutus-pioneer-program#exercises
I think you may be missing the following step:

Set-up IOHK binary caches How to set up the IOHK binary caches. "If you do not do this, you will end up building GHC, which takes several hours. If you find yourself building GHC, STOP and fix the cache."

As far as I can tell, GHCJS is not necessary, but I haven't tested this.

2063: <p>I'm trying to run the Plutus Pioneer code on a Docker container based on <a href="https://hub.docker.com/r/nixos/nix" rel="noreferrer">https://hub.docker.com/r/nixos/nix</a>.</p>
<p>I've followed this guide to install Cabal and GHC <a href="https://www.reddit.com/r/haskell/comments/dg4dvs/install_ghc_in_25mins_or_ghcjs_in_one_sleep_with/" rel="noreferrer">https://www.reddit.com/r/haskell/comments/dg4dvs/install_ghc_in_25mins_or_ghcjs_in_one_sleep_with/</a></p>
<p>I haven't been able to get GHCJS installed, though I'm not sure if it is necessary.</p>
<p>Is there any guide on pre-requisites for the Plutus Pioneer Program, ideally with install instructions?</p>
 2201: <p>I am running the Plutus Pioneer code in a nixos/nix based Docker container and it works a treat. I use the <code>nix-shell</code> as recommended in the pioneer program repo and I only needed to set up the IOHK binary caches and install <code>git</code> (using <code>nix</code>) as a prerequisite. I added <code>curl</code> and <code>tmux</code> to make it more user friendly. I use <code>tmux</code> to set up a three pane session containing the Plutus server, the playground GUI and one for interactive cabal. Below is the contents of the Dockerfile I use to buid the image.</p>
<pre><code>FROM nixos/nix

RUN echo &quot;substituters        = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/&quot; &gt;&gt; /etc/nix/nix.conf &amp;&amp; \
    echo &quot;trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=&quot; &gt;&gt; /etc/nix/nix.conf &amp;&amp; \
    nix-env --install git &amp;&amp; \
    nix-env --install curl &amp;&amp; \
    nix-env --install tmux
</code></pre>
<p>It is important to map the /nix folder to a data volume for better performance and to keep the size of the running container down. This folder can easily contain a few tens of Gb of data.</p>
<p>I keep the Plutus and Pioneer code repos on the host and map a data volume to bring it into the container:</p>
<pre><code>docker run -it -p 8009:8009 -v hkvb_nixos_plutus:/nix -v $(pwd):/plutus hkvb/nixos.plutus:original sh
</code></pre>
<p>This command only exposes the port of the Playground UI. The <code>hkvb/nixos.plutus</code> image was built using the Dockerfile above and is available on Docker Hub.</p>
<p>There is one minor change required in the Plutus code to make the playground accessible from outside the container. This is in the <a href="https://github.com/input-output-hk/plutus/blob/a2ce64860f10cfacb48070a6efc737a131faee6a/plutus-playground-client/webpack.config.js#L17" rel="nofollow noreferrer">webpack.config.js</a> file of the plutus-playground-client. THe DevServer is only bound to the localhost network interface (of the container). Adding the line</p>
<pre><code>host: &quot;0.0.0.0&quot;,
</code></pre>
<p>makes the server available external to the container.</p>
<p>[UPDATE 08/08/2021]<br />
I have found out that it is best to start from a freshly cloned (or new copy) of the Plutus repository when changing commits for build. Changing commit on a Plutus repository that was already used for a build often resulted in problems for me, often leading to never ending builds, especially when building the documentation.</p>
 1142: <p>There are instructions on the official input-output-hk/plutus-pioneer-program repo in the exercises chapter here: <a href="https://github.com/input-output-hk/plutus-pioneer-program#exercises" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-pioneer-program#exercises</a></p>
<p>I think you may be missing the following step:</p>
<blockquote>
<p>Set-up IOHK binary caches <a href="https://github.com/input-output-hk/plutus#iohk-binary-cache" rel="nofollow noreferrer">How to set up the IOHK binary caches</a>. &quot;If you do not do this, you will end up building GHC, which takes several hours. If you find yourself building GHC, STOP and fix the cache.&quot;</p>
</blockquote>
<p>As far as I can tell, GHCJS is not necessary, but I haven't tested this.</p>
