I'm trying to convert a docker image to a singularity image, but I'd prefer to do it all locally, rather than uploading it all to docker hub or another repository. I've had limited success with running the image and using the docker export command on the container and then building a singularity image from that, but it seems that environment variables set it the Dockerfile get lost in that kind of conversion. I think it's because docker export only exports the container's file system.
docker build
-t
my-image
.
docker run -it
--name for_export
my-image
/bin/true
docker export
for_export >
my-image.tar
singularity build my-image.simg
my-image.tar
singularity shell my-image.simg
echo $ENVVAR_SET_IN_DOCKERFILE
(nothing returned)
When I push the docker image to docker hub and build from there, it works as expected:
singularity build
my-image.simg
docker://nmerket/my-image
singularity shell my-image.simg
echo $ENVVAR_SET_IN_DOCKERFILE
(expected value returned)
I'd like to not have to upload and then download my image to Docker Hub to get this to work. Is there any way I can take a local docker image and convert it into a singularity image using the same mechanisms it uses to build a singularity image from layers on Docker Hub? I tried using the docker image save command and using the resulting tar file to build a singularity image, but that didn't work at all.
Thanks for your help,
Noel
--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
FATAL: While performing build: conveyor failed to get: Error reading manifest v1 in localhost:5000/hariszaf/pema: manifest unknown: manifest unknown
--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/1255d8ce-b7a9-4cf6-ba05-11bcf2cb8a4f%40lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/CAPw58N6AW9KS6LgyT7NOtp-Ay9p5W2gyQ7%2BKVQ1BG1BP%3D7zgwQ%40mail.gmail.com.
--Haris Zafeiropoulos, PhD student