Skip to content

Commit

Permalink
Merge pull request #2 from benjaoming/docker
Browse files Browse the repository at this point in the history
Add a Dockerfile w/ usage example
  • Loading branch information
phreppo committed Feb 17, 2024
2 parents 93d219e + 11b480b commit be072d8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ocaml/opam:alpine-3.18-ocaml-4.14 as build


WORKDIR /home/opam


COPY --chown=opam:opam . .

RUN make deps
RUN make
RUN make install

CMD rat
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ dune exec rat -- <args>
Run with `--help` to print the help message.
If there are no arguments, the command runs the interactive interpreter.

To run `rat` inside Docker:

``` bash
# Build (you just need to do this once
docker build . -t rat:latest

# Example of running rat with arguments
docker run rat:latest rat --regex '(a|a)*b'
```

## Example Analysis

Assume we have `rat` installed on the machine.
Expand Down

0 comments on commit be072d8

Please sign in to comment.