Commit Graph
7 Commits
Author SHA1 Message Date
Luca Di Maio 8eb38fbd5c init: add upgrade mode
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2022-08-31 15:07:13 +02:00
Luca Di Maio 2a26ab654e docs: improve man pages layout
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2022-06-22 08:47:30 +02:00
Michel Alexandre Salim 62dd2fda8f init: Implement pre-initialization hooks (#269)
* Implement pre-initialization hooks

This implements support for running commands prior to most of the
container initialization. e.g. for RHEL and derivatives you might need
to pre-enable the PowerTools/CRB and EPEL repositories.

Resolves: #220

```
distrobox on  main [!⇡]
✦ ❯ ./distrobox create -i registry.fedoraproject.org/fedora-toolbox:36 f36-packaging
a3cc54e5a820b6bd95286ec142cb3eeab7f72b42cebf6fa0d3c0072035b3bca4
Distrobox 'f36-packaging' successfully created.
To enter, run:

distrobox-enter f36-packaging

distrobox on  main [!⇡]
✦ ❯ ./distrobox enter f36-packaging
Container f36-packaging is not runnung.
Starting container f36-packaging
run this command to follow along:

 podman logs -f f36-packaging

 Starting container...                  	 [ OK ]
 Installing basic packages...           	 [ OK ]
 Setting up read-only mounts...         	 [ OK ]
 Setting up read-write mounts...        	 [ OK ]
 Setting up host's sockets integration...	 [ OK ]
 Integrating host's themes, icons, fonts...	 [ OK ]
 Setting up package manager exceptions...	 [ OK ]
 Setting up sudo...                     	 [ OK ]
 Setting up groups...                   	 [ OK ]
 Setting up users...                    	 [ OK ]
 Executing init hooks...                	 [ OK ]

Container Setup Complete!
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish

distrobox on  main [!⇡]
⬢ [fedora-toolbox:36] ❯
```

Enable PowerTools (recommended to use EPEL) and EPEL Next, so
`distrobox` can install the Fish shell.

```
distrobox on  main [!⇡]
✦ ❯ ./distrobox create -i quay.io/centos/centos:stream8 c8s --pre-init-hooks "dnf config-manager --enable powertools && dnf -y install epel-next-release"
9b17e8cfbf8e7a26abdc7a78b2325e1ee4a9577662b0fe94fbde4260269e1ce3
Distrobox 'c8s' successfully created.
To enter, run:

distrobox-enter c8s

distrobox on  main [!⇡]
✦ ❯ ./distrobox enter c8s
Container c8s is not runnung.
Starting container c8s
run this command to follow along:

 podman logs -f c8s

 Starting container...                  	 [ OK ]
 Executing pre-init hooks...            	 [ OK ]
 Installing basic packages...           	 [ OK ]
 Setting up read-only mounts...         	 [ OK ]
 Setting up read-write mounts...        	 [ OK ]
 Setting up host's sockets integration...	 [ OK ]
 Integrating host's themes, icons, fonts...	 [ OK ]
 Setting up package manager exceptions...	 [ OK ]
 Setting up sudo...                     	 [ OK ]
 Setting up groups...                   	 [ OK ]
 Setting up users...                    	 [ OK ]
 Executing init hooks...                	 [ OK ]

Container Setup Complete!
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish

distrobox on  main
⬢ [centos:stream8] ❯
```

Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>

* Fix typo: s/runnung/running

Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>

* simplify pre-init-hooks detection, add useful tips

Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>

* More changes to address review feedback

- distrobox-init: indent new if block
- distrobox-create: restore quote around pre-init-hooks arguments
- docs/usage: document new create and init options
- docs/useful_tips: explain the rationale behind --pre-init-hooks

Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
2022-05-15 20:14:24 +02:00
89luca89 ac320cc40a docs: update and format docs 2022-04-05 17:12:42 +02:00
89luca89 fbe84f954d create/init: add and document - support for using init systems inside the containers 2022-01-28 23:30:25 +01:00
89luca89 f5b1bec72d docs: update docs 2022-01-27 22:51:47 +01:00
Mišo Barišićand89luca89 b1426f31c6 Create Manuals (#99)
* Create distrobox-create manpage. Include manpage in the install script

Co-authored-by: 89luca89 <luca.dimaio1@gmail.com>
2022-01-13 19:23:12 +01:00