Skip to content

Commit eab1115

Browse files
committed
Add installation and build instructions for Docker images
1 parent fb45d82 commit eab1115

File tree

1 file changed

+52
-4
lines changed

1 file changed

+52
-4
lines changed

README.md

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ The `newdoc` tool generates pre-populated module and assembly files formatted wi
88

99
The tool is written in the Rust programming language.
1010

11-
It has not been tested on Microsoft Windows.
12-
1311

1412
## Installing newdoc
1513

@@ -18,17 +16,29 @@ It has not been tested on Microsoft Windows.
1816
```
1917
# dnf copr enable mareksu/newdoc-rs
2018
# dnf install newdoc
19+
20+
$ newdoc
2121
```
2222
23-
* On a different Linux distribution, on macOS, or on Microsoft Windows, use the `cargo` package manager:
23+
* To install `newdoc` as a Docker image, use the `docker` or `podman` tool. If you use `podman`, replace `docker` with `podman` in the following commands:
24+
25+
```
26+
$ docker pull mrksu/newdoc
27+
28+
$ docker run mrksu/newdoc
29+
```
30+
31+
32+
* To install `newdoc` from source on a Linux distribution, on macOS, or on Microsoft Windows, use the `cargo` package manager:
2433
2534
```
2635
$ cargo install newdoc
36+
37+
$ newdoc
2738
```
2839
2940
For installing `cargo`, see <https://rustup.rs/>.
3041
31-
Note that `newdoc` has not been tested on Microsoft Windows.
3242
3343
## Creating a new module
3444
@@ -106,6 +116,44 @@ It has not been tested on Microsoft Windows.
106116
8. Click **Build**.
107117
108118
119+
## Packaging and distributing newdoc as a Docker image
120+
121+
Note: The following steps might be sub-optimal. Feel free to suggest improvements.
122+
123+
1. Install the `docker` or `podman` tool.
124+
125+
If you use `podman`, replace `docker` with `podman` in the following commands.
126+
127+
2. Log into the Docker Hub account:
128+
129+
```
130+
$ docker login --username mrksu docker.io
131+
```
132+
133+
3. Build a new image. For example:
134+
135+
```
136+
$ docker build -t mrksu/newdoc:v2.3.3 .
137+
```
138+
139+
4. Find the Image ID of the built image:
140+
141+
```
142+
$ docker images
143+
```
144+
145+
5. Tag the new version. For example:
146+
147+
```
148+
$ docker tag 390e73cb470d mrksu/newdoc:v2.3.3
149+
```
150+
151+
6. Upload the new image:
152+
153+
```
154+
$ docker push mrksu/newdoc:v2.3.3
155+
```
156+
109157
## Additional resources
110158
111159
* [Modular Documentation Reference Guide](https://redhat-documentation.github.io/modular-docs/)

0 commit comments

Comments
 (0)