Mise à jour de 'README.md'

This commit is contained in:
yo 2021-12-19 17:04:27 +01:00
parent 6cef2918b4
commit 754a937eb8

View File

@ -1,16 +1,22 @@
# gocage GoCage
=======
Jail management tool for FreeBSD, written in Go. Jail management tool for FreeBSD, written in Go.
Support iocage jails, so they can coexist. Support iocage jails, so they can coexist.
Gocage is meant to be a complete jail management tool with network, snapshots, jail cloning support and a web interface. Gocage is meant to be a complete jail management tool with network, snapshots, jail cloning support and a web interface. This is the hypothetic future.
# List jails At present time, it list and stops jails.
Nothing fancy, use
List jails
----------
Nothing fancy, just use
`gocage list` `gocage list`
## Specify fields to display ### Specify fields to display
Use -o to specify which fields you want to display: Use -o to specify which fields you want to display:
`gocage list -o JID,Name,Running,Config.Boot,Config.Comment <pre><code>
gocage list -o JID,Name,Running,Config.Boot,Config.Comment
+=====+==========+=========+=============+================+ +=====+==========+=========+=============+================+
| JID | Name | Running | Config.Boot | Config.Comment | | JID | Name | Running | Config.Boot | Config.Comment |
+=====+==========+=========+=============+================+ +=====+==========+=========+=============+================+
@ -22,11 +28,17 @@ Use -o to specify which fields you want to display:
+-----+----------+---------+-------------+----------------+ +-----+----------+---------+-------------+----------------+
| 22 | srv-dns1 | true | 1 | | | 22 | srv-dns1 | true | 1 | |
+-----+----------+---------+-------------+----------------+ +-----+----------+---------+-------------+----------------+
` </code></pre>
Filter jails
----------
## Filter jails
### By name ### By name
Just add name on gocage list command : Just add name on gocage list command :
<pre><code>
gocage list srv-bdd srv-web gocage list srv-bdd srv-web
+=====+=========+=================+=======================+=========+ +=====+=========+=================+=======================+=========+
| JID | Name | Config.Release | Config.Ip4_addr | Running | | JID | Name | Config.Release | Config.Ip4_addr | Running |
@ -35,9 +47,11 @@ Just add name on gocage list command :
+-----+---------+-----------------+-----------------------+---------+ +-----+---------+-----------------+-----------------------+---------+
| 41 | srv-web | 13.0-RELEASE-p4 | vnet0|192.168.1.26/24 | true | | 41 | srv-web | 13.0-RELEASE-p4 | vnet0|192.168.1.26/24 | true |
+-----+---------+-----------------+-----------------------+---------+ +-----+---------+-----------------+-----------------------+---------+
</pre></code>
### By field value ### By field value
You can filter jails with -f option, followed by key=value. Suppose you want to see only active at boot jails: You can filter jails with -f option, followed by key=value. Suppose you want to see only active at boot jails:
<pre><code>
gocage list -f Config.Boot=1 -o JID,Name,Running,Config.Boot,Config.Comment gocage list -f Config.Boot=1 -o JID,Name,Running,Config.Boot,Config.Comment
+=====+==========+=========+=============+================+ +=====+==========+=========+=============+================+
| JID | Name | Running | Config.Boot | Config.Comment | | JID | Name | Running | Config.Boot | Config.Comment |
@ -50,8 +64,10 @@ You can filter jails with -f option, followed by key=value. Suppose you want to
+-----+----------+---------+-------------+----------------+ +-----+----------+---------+-------------+----------------+
| 22 | srv-dns1 | true | 1 | | | 22 | srv-dns1 | true | 1 | |
+-----+----------+---------+-------------+----------------+ +-----+----------+---------+-------------+----------------+
</pre></code>
Now, only active at boot and running : Now, only active at boot and running :
<pre><code>
gocage list -f Config.Boot=1,Running=true -o JID,Name,Running,Config.Boot gocage list -f Config.Boot=1,Running=true -o JID,Name,Running,Config.Boot
+=====+==========+=========+=============+ +=====+==========+=========+=============+
| JID | Name | Running | Config.Boot | | JID | Name | Running | Config.Boot |
@ -62,5 +78,9 @@ Now, only active at boot and running :
+-----+----------+---------+-------------+ +-----+----------+---------+-------------+
| 22 | srv-dns1 | true | 1 | | 22 | srv-dns1 | true | 1 |
+-----+----------+---------+-------------+ +-----+----------+---------+-------------+
</pre></code>
Stop jails
----------
`gocage stop test`