简体   繁体   中英

Porting docker build commands to Singularity

    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.

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. eg,. --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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM