0
    docker build \
    --tag gcr.io/fuzzbench/runners/afl/libpng-1.2.56-intermediate \
    --build-arg BUILDKIT_INLINE_CACHE=1 \
    --cache-from gcr.io/fuzzbench/runners/afl/libpng-1.2.56-intermediate \
    --file fuzzers/afl/runner.Dockerfile \
    fuzzers/afl

I want to port this to a Singularity build command. (Singularity does not support tag/build-arg/etc.) Also on a separate issue, in my Dockerfiles I have ARG, and spython says WARNING ARG is not supported for Singularity, and must be defined with a default to be parsed. , and there is really little documentation on how to port from Docker to Singularity.

Iman Hosseini
  • 33
  • 1
  • 6

1 Answers1

2

The simplest way to "port" a Docker image to Singularity is to build the Singularity image directly from the Docker image: singularity build libpng_1.2.56.sif docker://gcr.io/fuzzbench/runners/afl/libpng-1.2.56-intermediate. If the source docker image has been built locally and is not in a remote registry use docker-daemon:// instead of docker://.

The documentation also has a pretty sizable Singularity and Docker section that goes over using Docker images with Singularity and similarities/differences between a Singularity definition file and a Dockerfile.

If you want to maintain separate Dockerfile and Singularity files for creating images, keep in mind there is not always a direct equivalent. e.g,. --tag in Docker is effectively equivalent to the filename of the Singularity image, buildkit settings are specific to the Docker build process and do not have a counterpart in Singularity.

tsnowlan
  • 3,472
  • 10
  • 15