Dockerize Devlopment Environment

Distrobox https://github.com/89luca89/distrobox

 1
 2distrobox-create --name dev-env-ubuntu-20 --image ubuntu:20.04 
 3
 4distrobox-enter --name dev-env-ubuntu-20
 5
 6su -
 7
 8apt install vscode
 9
10exit
11
12distrobox-create --name <cloned> --clone dev-env-ubuntu-20
13
14## save container as a image
15podman container commit <container-id> <image-name>
16
17podman save image-name | xz -T0 -c images.txz
18
19podman load images.txz

Toolbox https://github.com/containers/toolbox

 1
 2<define your docjer file>
 3podman build . -t my-image-name
 4toolbox create -i imagename
 5toolbox enter imagename
 6toolbox list
 7# backup and restore
 8podman container commit -p <container id>  <img name>
 9
10toolbox create --container go --image localhost/go-backup:latest
11podman save -o img.tar image-name