Skip to content

Commit

Permalink
Updates README with Docker dev setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lcaparroz committed Feb 8, 2024
1 parent cc0246d commit b93c5b9
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,35 @@ There different ways to run the module:
* `DISPLAY= rake run` — forces to run in ncurses mode;
* `Y2DIR=src/ /usr/sbin/yast2 --ncurses rmt` — same as above.

#### Docker Setup

To run the module within a Docker container:

1. Select a proper Docker container image for YaST from https://registry.opensuse.org, according to the branch, e.g.:

* On branch `master`, use `yast/head/containers_tumbleweed/yast-ruby`.
* On branch `SLE-15-SP6`, use `yast/sle-15/sp6/containers/yast-ruby`.

2. Run the Docker container with access to the localhost network with the chosen distribution and version:

```shell
docker run --network host -v "$(pwd):/usr/src/app" -w "/usr/src/app" -it registry.opensuse.org/yast/sle-15/sp6/containers/yast-ruby sh
```

3. On the container, install the `rmt-server` package:

```shell
zypper --non-interactive install rmt-server
```

4. Run the YaST RMT module with `rake run` or through the other ways previously described.

### Running tests

It is possible to run the specs in a Docker container:

```
docker build -t yast-rmt-image .
docker run -it yast-rmt-image rspec
```shell
docker run -v "$(pwd):/usr/src/app" -w "/usr/src/app" -it registry.opensuse.org/yast/sle-15/sp6/containers/yast-ruby rake test:unit
```

### Resources
Expand Down

0 comments on commit b93c5b9

Please sign in to comment.