# EESSI hackathon Jan'22 - exporting EESSI to a tarball and/or container image
Live collaborative notes for this task during the 2nd EESSI hackathon; see also general notes at https://hackmd.io/vSOfDj-SQSmYglhxz_R4hg
Notes from Dec'21 hackathon: https://github.com/EESSI/meetings/wiki/EESSI-hackathon-Dec'21
* Milestone 1: local /tmp indeed much faster :)
* enables turnaround time in minutes
* Milestone 2: rootless singularity build --fakeroot
* meh - still requires admin to populate /etc/subuid and subgid for user who wants to do this; --userns seems to be only for running containers, not for building
* Milestone 3: get rid of intermediate tar
* fail - there are bunch of symlinks in eessi trees that look like they are meant for chroot env; singularity build refuses to copy them and there's no obvious way to work around that
* use `find $EESSI_PREFIX -xtype l` to find them
* tar also finds a bunch of "permission denied" files as regular user so we have to ignore any errors it spits out
* Milestone 4: use same init procedure as one would for regular EESSI
* initially looks simple to do at container startup, but ...
* $BASH_SOURCE is either empty or set to $PWD from which container is started, therefore eessi init/bash fails early
* attempt to redo most of init/bash in container %post and %runscript not feasible in context of this hackathon
* fallback: just print how to init eessi env and load desired module as part of container startup and let user do it
* and while doing that, also check that container was started with --cleanenv to avoid confusion
* Milestone 5: polish & user friendliness
* even implemented some cli options
* Milestone 6: initial readme
* done
* TODO: explore how to integrate potential testing from test suites
* TODO: explore persistent identifiers and workflow around them