Skip to content

Commit 9a1a0db

Browse files
authored
Merge pull request #82 from mskott/man-page
Add manpages for podman-bootc
2 parents 96bfc8f + 368eab3 commit 9a1a0db

15 files changed

+1514
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
# Because all the git clones are much less reliable
2020
export GOPROXY=https://proxy.golang.org
2121
go install github.com/onsi/ginkgo/v2/ginkgo@latest
22+
go install github.com/cpuguy83/go-md2man@latest
2223
make GOOPTS=-buildvcs=false
2324
export PATH=$PATH:$HOME/go/bin
2425
make integration_tests

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/bin
22
test/e2e/e2e.test
3+
docs/*.1

Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ binary_name = podman-bootc
22
output_dir = bin
33
build_tags = exclude_graphdriver_btrfs,btrfs_noversion,exclude_graphdriver_devicemapper,containers_image_openpgp,remote
44

5-
all: out_dir
5+
all: out_dir docs
66
go build -tags $(build_tags) $(GOOPTS) -o $(output_dir)/$(binary_name)
77

88
out_dir:
99
mkdir -p $(output_dir)
1010

11-
lint:
11+
lint: validate_docs
1212
golangci-lint --build-tags $(build_tags) run
1313

1414
integration_tests:
@@ -18,5 +18,15 @@ integration_tests:
1818
e2e_test: all
1919
ginkgo -tags $(build_tags) ./test/...
2020

21+
.PHONY: docs
22+
docs:
23+
make -C docs
24+
2125
clean:
2226
rm -f $(output_dir)/*
27+
make -C docs clean
28+
29+
.PHONY: validate_docs
30+
validate_docs:
31+
hack/man-page-checker
32+
hack/xref-helpmsgs-manpages

docs/Makefile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
PREFIX := /usr/local
2+
DATADIR := ${PREFIX}/share
3+
MANDIR := $(DATADIR)/man
4+
GO ?= go
5+
GOMD2MAN ?= go-md2man
6+
ifeq ($(shell uname -s),FreeBSD)
7+
SED=gsed
8+
else
9+
SED=sed
10+
endif
11+
# This must never include the 'hack' directory
12+
export PATH := $(shell $(GO) env GOPATH)/bin:$(PATH)
13+
14+
docs: $(patsubst %.md,%,$(wildcard *[1].md))
15+
16+
%.1: %.1.md
17+
### sed is used to filter http/s links as well as relative links
18+
### replaces "\" at the end of a line with two spaces
19+
### this ensures that manpages are rendered correctly
20+
@$(SED) -e 's/\((podman-bootc[^)]*\.md\(#.*\)\?)\)//g' \
21+
-e 's/\[\(podman-bootc[^]]*\)\]/\1/g' \
22+
-e 's/\[\([^]]*\)](http[^)]\+)/\1/g' \
23+
-e 's;<\(/\)\?\(a\|a\s\+[^>]*\|sup\)>;;g' \
24+
-e 's/\\$$/ /g' $< | \
25+
$(GOMD2MAN) -in /dev/stdin -out $@
26+
27+
.PHONY: install
28+
install: docs
29+
install -d ${DESTDIR}/${MANDIR}/man1
30+
install -m 0644 podman-bootc*.1 ${DESTDIR}/${MANDIR}/man1
31+
install -m 0644 links/podman-bootc*.1 ${DESTDIR}/${MANDIR}/man1
32+
33+
.PHONY: install-tools
34+
install-tools:
35+
go install github.com/cpuguy83/go-md2man@latest
36+
37+
.PHONY: clean
38+
clean:
39+
$(RM) -f podman-bootc*.1

docs/podman-bootc-completion.1.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
% podman-bootc-completion 1
2+
3+
## NAME
4+
podman-bootc-completion - Generate the autocompletion script for the specified shell
5+
6+
## SYNOPSIS
7+
**podman-bootc completion** *bash* | *fish* | *powershell* | *zsh* [*options*]
8+
9+
## DESCRIPTION
10+
**podman-bootc completion** generate shell completion scripts for a variety of shells.
11+
Supported shells are *bash*, *fish*, *powershell*, and *zsh*.
12+
13+
## OPTIONS
14+
15+
#### **--help**, **-h**
16+
Show details on how to use the script generated for the particular shell.
17+
18+
#### **--no-descriptions**
19+
Disable completion descriptions.
20+
21+
## SEE ALSO
22+
23+
**[podman-bootc(1)](podman-bootc.1.md)**
24+
25+
## HISTORY
26+
Dec, 2024, Originally compiled by Martin Skøtt <[email protected]>

docs/podman-bootc-images.1.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
% podman-bootc-images 1
2+
3+
## NAME
4+
podman-bootc-images - List bootc images in the local containers store
5+
6+
## SYNOPSIS
7+
**podman-bootc images**
8+
9+
## DESCRIPTION
10+
**podman-bootc images** list bootc images in the containers store of the podman machine.
11+
The podman machine must be running to use this command.
12+
13+
## OPTIONS
14+
15+
#### **--help**, **-h**
16+
Help for images
17+
18+
#### **--log-level**=*level*
19+
Log messages at and above specified level: __debug__, __info__, __warn__, __error__, __fatal__ or __panic__ (default: _warn_)
20+
21+
## SEE ALSO
22+
23+
**[podman-bootc(1)](podman-bootc.1.md)**
24+
25+
## HISTORY
26+
Dec, 2024, Originally compiled by Martin Skøtt <[email protected]>

docs/podman-bootc-list.1.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
% podman-bootc-list 1
2+
3+
## NAME
4+
podman-bootc-list - List installed OS Containers
5+
6+
## SYNOPSIS
7+
**podman-bootc list**
8+
9+
## DESCRIPTION
10+
**podman-bootc list** displays installed OS containers and their status.
11+
12+
The podman machine must be running to use this command.
13+
14+
## OPTIONS
15+
16+
#### **--help**, **-h**
17+
Help for list
18+
19+
#### **--log-level**=*level*
20+
Log messages at and above specified level: __debug__, __info__, __warn__, __error__, __fatal__ or __panic__ (default: _warn_)
21+
22+
## SEE ALSO
23+
24+
**[podman-bootc(1)](podman-bootc.1.md)**
25+
26+
## HISTORY
27+
Dec, 2024, Originally compiled by Martin Skøtt <[email protected]>

docs/podman-bootc-rm.1.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
% podman-bootc-rm 1
2+
3+
## NAME
4+
podman-bootc-rm - Remove installed bootc VMs
5+
6+
## SYNOPSIS
7+
**podman-bootc rm** *id* [*options*]
8+
9+
## DESCRIPTION
10+
**podman-bootc rm** removes an installed bootc VM/container from the podman machine.
11+
12+
Use **[podman-bootc list](podman-bootc-list.1.md)** to find the IDs of installed VMs.
13+
14+
The podman machine must be running to use this command.
15+
16+
## OPTIONS
17+
18+
#### **--all**
19+
Removes all non-running bootc VMs
20+
21+
#### **--force**, **-f**
22+
Terminate a running VM
23+
24+
#### **--help**, **-h**
25+
Help for rm
26+
27+
#### **--log-level**=*level*
28+
Log messages at and above specified level: __debug__, __info__, __warn__, __error__, __fatal__ or __panic__ (default: _warn_)
29+
30+
## SEE ALSO
31+
32+
**[podman-bootc(1)](podman-bootc.1.md)**, **[podman-bootc-list(1)](podman-bootc-list.1.md)**
33+
34+
## HISTORY
35+
Dec, 2024, Originally compiled by Martin Skøtt <[email protected]>

docs/podman-bootc-run.1.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
% podman-bootc-run 1
2+
3+
## NAME
4+
podman-bootc-run - Run a bootc container as a VM
5+
6+
## SYNOPSIS
7+
**podman-bootc run** [*options*] *image* | *id*
8+
9+
## DESCRIPTION
10+
**podman-bootc run** creates a new virtual machine from a bootc container image or starts an existing one.
11+
It then creates an SSH connection to the VM using injected credentials (see *--background* to run in the background).
12+
13+
The podman machine must be running to use this command.
14+
15+
## OPTIONS
16+
17+
#### **--background**, **-B**
18+
Do not spawn SSH, run in background.
19+
20+
#### **--cloudinit**=**string**
21+
--cloud-init <cloud-init data directory>
22+
23+
#### **--disk-size**=**string**
24+
Allocate a disk image of this size in bytes; optionally accepts M, G, T suffixes
25+
26+
#### **--filesystem**=**string**
27+
Override the root filesystem, e.g. xfs, btrfs, ext4.
28+
29+
#### **--help**, **-h**
30+
Help for run
31+
32+
#### **--log-level**=*level*
33+
Log messages at and above specified level: __debug__, __info__, __warn__, __error__, __fatal__ or __panic__ (default: _warn_)
34+
35+
#### **--quiet**
36+
Suppress output from bootc disk creation and VM boot console
37+
38+
#### **--rm**
39+
Remove the VM and it's disk image when the SSH connection exits. Cannot be used with *--background*
40+
41+
#### **--root-size-max**=**string**
42+
Maximum size of root filesystem in bytes; optionally accepts M, G, T suffixes
43+
44+
#### **--user**, **-u**=**root** | *user name*
45+
User name of injected user, default: root
46+
47+
## EXAMPLES
48+
Create a virtual machine based on the latest bootable image from Fedora using XFS as the root filesystem.
49+
```
50+
$ podman-bootc run --filesystem=xfs quay.io/fedora/fedora-bootc:latest
51+
```
52+
53+
Start a previously created VM, using *podman-bootc list* to find its ID.
54+
```
55+
$ podman-bootc list
56+
ID REPO SIZE CREATED RUNNING SSH PORT
57+
d0300f628e13 quay.io/fedora/fedora-bootc:latest 10.7GB 4 minutes ago false 34173
58+
$ podman-bootc run d0300f628e13
59+
```
60+
61+
## SEE ALSO
62+
63+
**[podman-bootc(1)](podman-bootc.1.md)**
64+
65+
## HISTORY
66+
Dec, 2024, Originally compiled by Martin Skøtt <[email protected]>

docs/podman-bootc-ssh.1.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
% podman-bootc-ssh 1
2+
3+
## NAME
4+
podman-bootc-ssh - SSH into an existing OS Container machine
5+
6+
## SYNOPSIS
7+
**podman-bootc ssh** *id* [*options*]
8+
9+
## DESCRIPTION
10+
**podman-bootc ssh** opens an SSH connection to a running OS container machine.
11+
12+
Use **[podman-bootc list](podman-bootc-list.1.md)** to find the IDs of installed VMs.
13+
14+
## OPTIONS
15+
16+
#### **--help**, **-h**
17+
Help for ssh
18+
19+
#### **--log-level**=*level*
20+
Log messages at and above specified level: __debug__, __info__, __warn__, __error__, __fatal__ or __panic__ (default: _warn_)
21+
22+
#### **--user**, **-u**=**root** | *user name*
23+
User name to use for connection, default: root
24+
25+
## SEE ALSO
26+
27+
**[podman-bootc(1)](podman-bootc.1.md)**, **[podman-bootc-list(1)](podman-bootc-list.1.md)**
28+
29+
## HISTORY
30+
Dec, 2024, Originally compiled by Martin Skøtt <[email protected]>

0 commit comments

Comments
 (0)