1. Dependencies
buildah
: A tool that facilitates building OCI images https://github.com/containers/buildahpython
2. Steps
git clone -b develop ssh://git@git.iter.org/imex/imas-container.git cd imas-container/ ./01-base ./02-ual # will ask for SSH private key to access git.iter.org ./03-kepler # as above ./04-fc2k # as above
- Each step creates a cached layer
- First
imas/base
is created with compilers, libraries, etc. - Then
imas/ual
on top of that with IMAS environment - Next
imas/kepler
with addition of Kepler - Finally
imas/fc2k
with FC2K installation
3. Saving the image
Check image ID with command:
$ buildah images REPOSITORY TAG IMAGE ID CREATED SIZE localhost/imas/fc2k latest ba3ac550589e 7 days ago 2.98 GB
Save to Docker daemon:
buildah push ba3ac550589e docker-daemon:imas/fc2k:latest
Save to file:
docker save imas/fc2k:latest | xz > imas-fc2k-latest.tar.xz
3.1. Warning
You could use buildah push <IMAGE-ID> docker-archive:FILE.TAR
to export directly to a file. However, uDocker is unable to load such files, therefore it is recommended to export images through Docker daemon as described above.