diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000000..7b989cd7dc --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,35 @@ +FROM node:13.10.1-slim + +RUN apt-get update +RUN apt-get install -y yarn +RUN apt-get install -y git +RUN apt-get install -y libacl1-dev +RUN apt-get install -y libncurses-dev + +#esy install +RUN apt-get install -y curl + +#esy bootstrap +RUN apt-get install -y clang +RUN apt-get install -y make +RUN apt-get install -y m4 +RUN apt-get install -y nasm +RUN apt-get install -y libfontconfig1-dev +RUN apt-get install -y libx11-dev +RUN apt-get install -y libsdl2-dev +RUN apt-get install -y libbz2-dev +RUN apt-get install -y libgtk-3-dev + +RUN apt-get install -y opam +RUN opam init +RUN opam install dune + +RUN yarn global add esy@0.6.2 + +WORKDIR /code + +RUN esy install +RUN esy bootstrap +RUN esy build + +CMD esy run \ No newline at end of file diff --git a/docs/docs/for-developers/building.md b/docs/docs/for-developers/building.md index 2b29c21a37..3185264650 100644 --- a/docs/docs/for-developers/building.md +++ b/docs/docs/for-developers/building.md @@ -155,3 +155,17 @@ From the `oni2` directory: - `cd docs/website` - `npm install` - `npm start` + +### Docker + +```bash +docker build --network=host -t oni2-dev -f Dockerfile.dev . +# Creates a 12GB image !!! + +docker run -it \ + -v ${PWD}:/code \ + -v "$HOME/.Xauthority:/root/.Xauthority:rw" \ + --network=host \ + --env="DISPLAY" \ + oni2-dev +``` \ No newline at end of file