-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: development setup in Docker #1478
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
Comment on lines
+3
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All Something like: RUN apt-get update -q && apt-get install -y --no-install-recommends \
yarn \
git \
…
…
…
&& rm -rf /var/lib/apt/lists/* At the end the apt cache is no longer required and deleted, for a slimmer container image. Same with the rest of the similar |
||
RUN opam init | ||
RUN opam install dune | ||
|
||
RUN yarn global add [email protected] | ||
|
||
WORKDIR /code | ||
|
||
RUN esy install | ||
RUN esy bootstrap | ||
RUN esy build | ||
|
||
CMD esy run | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the CMD ["esy", "run"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👏🏼 |
||
-v ${PWD}:/code \ | ||
-v "$HOME/.Xauthority:/root/.Xauthority:rw" \ | ||
--network=host \ | ||
--env="DISPLAY" \ | ||
oni2-dev | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use not use a LTS version? 14.15.4 is the latest LTS.
https://nodejs.org/en/download/releases/