mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
Add more examples
This commit is contained in:
parent
a293daa7bb
commit
e13f30f058
1 changed files with 29 additions and 2 deletions
|
@ -1,9 +1,36 @@
|
||||||
# Official Docker Images
|
# Official Docker Images
|
||||||
|
|
||||||
The latest official Docker images are available on the [Docker Hub](https://hub.docker.com/u/roclang).
|
The latest [official Docker images](https://hub.docker.com/u/roclang) are available on the Docker Hub.
|
||||||
|
|
||||||
For example, if you run the following command in a terminal, Docker will pull the latest `nightly-ubuntu-2204` image from the Docker Hub and start an interactive container based on this image, running the `roc repl` command:
|
For example, to pull the latest `nightly-ubuntu-2204` image from the Docker Hub, run the following command in a terminal (assuming you have already installed [Docker](https://docs.docker.com/engine/install/)):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker pull roclang/nightly-ubuntu-2204
|
||||||
|
```
|
||||||
|
|
||||||
|
To start an interactive container based on this image, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -it --rm roclang/nightly-ubuntu-2204
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: the `--rm` option will delete the container when you exit. Remove this option is you want to keep the container instead.
|
||||||
|
|
||||||
|
Inside the container, you can use the `roc` command directly, for example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
roc version
|
||||||
|
roc repl
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, you can start a container and run a Roc REPL in one shot:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm roclang/nightly-ubuntu-2204 /usr/lib/roc/roc repl
|
docker run -it --rm roclang/nightly-ubuntu-2204 /usr/lib/roc/roc repl
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you want to create you own Docker image based on this image, add the following in your `Dockerfile`:
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
FROM roclang/nightly-ubuntu-2204:latest
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue