-
Notifications
You must be signed in to change notification settings - Fork 3
Add Dockerfile and corresponding instructions to README.md #43
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
Open
Ellipse0934
wants to merge
7
commits into
farkon00:master
Choose a base branch
from
Ellipse0934:ap/dockerfile
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1796f13
feat: Add Dockerfile and corresponding instructions to README.md
Ellipse0934 a20dec6
Fixed dependency information in the README
farkon00 ec14bed
feat: Copy local SRC to Dockerfile
Ellipse0934 5084930
doc: Mount your local Volume
Ellipse0934 39ce603
fix: Spelling bischebis -> bitchebis
Ellipse0934 a70a3db
fix: Directory Mount Instructions
Ellipse0934 55c8206
fix: Remove user from Dockerfile
Ellipse0934 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| FROM debian | ||
|
|
||
| SHELL ["/bin/bash", "-c"] | ||
|
|
||
| RUN apt-get update | ||
| RUN apt install -y git \ | ||
| python3 \ | ||
| python3-pytest \ | ||
| fasm \ | ||
| nodejs \ | ||
| wabt | ||
| RUN ln -s /usr/bin/python3 /usr/bin/python | ||
|
|
||
| WORKDIR / | ||
| RUN mkdir cont | ||
| COPY . cont | ||
| WORKDIR cont |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,16 @@ I just mixed beginning of that word and tried to come up with something, that so | |
| # Quick Start | ||
| You can learn the language by using the ["Learn cont" manual](https://github.com/farkon00/cont/blob/master/learn-cont/00-learn-cont.md) | ||
|
|
||
| ```bash | ||
| To use the language you need to install the following dependencies: | ||
| - python3 | ||
| - pip | ||
| - fasm | ||
| - wabt(required only for the `wat64` target) | ||
| Also we recommend installing the following dependencies for testing purposes: | ||
| - nodejs | ||
|
|
||
| To setup directly on your machine: | ||
| ```console | ||
| $ python3 -V | ||
| Python >=3.10 | ||
|
|
||
|
|
@@ -26,6 +35,38 @@ $ pytest test.py | |
| $ python3 cont.py <source_code>.cn -r | ||
| ``` | ||
|
|
||
| Alternatively you may use the Dockerfile provided and work inside a container. | ||
|
|
||
| In the cont directory | ||
| ```bash | ||
| docker build --tag cont . | ||
| ``` | ||
| Then | ||
| ```bash | ||
| docker run -it cont /bin/bash | ||
| ``` | ||
| ```console | ||
| cont $ docker run -it cont /bin/bash | ||
| bitchebis@6caa64b7c4b9:~/cont$ pytest test.py | ||
| =================================== test session starts =================================== | ||
| platform linux -- Python 3.11.2, pytest-7.2.1, pluggy-1.0.0+repack | ||
| rootdir: /home/bitchebis/cont | ||
| collected 40 items | ||
|
|
||
| test.py ........................................ [100%] | ||
|
|
||
| =================================== 40 passed in 2.52s ==================================== | ||
| bitchebis@6caa64b7c4b9:~/cont$ | ||
| ``` | ||
|
|
||
| If you want to mount your local filesystem to the container then: | ||
| ```sh | ||
| LOCALDIR=~/code/cont | ||
| ``` | ||
| ```sh | ||
| docker run --mount type=bind,source=$LOCALDIR,target=/code -it cont /bin/bash | ||
|
Owner
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. This way of mounting a local directory doesn't work in all cases, because of permission issues. We should find a better way to handle this. |
||
| ``` | ||
|
|
||
| # Examples | ||
| You can find more examples in `tests` or `examples` folders or | ||
| in the standard library source, which can be found in `std`. | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is debian/ubuntu specific. For people on Arch, RHEL, nix,.etc it wont work hence the qualifier.
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.
Yes, but the comment right next to the apt command specifies to use your package manager and the only command, that changes depending on your distro, is that apt command. I think specifying it to be debian/ubuntu based specifically might confuse people, who might think the only supported option on other distros is to use the docker container.