Skip to content

Add pull property for pull image instead of build #103

Description

@easeway

Add pull property to be used in two scenarios:

  1. With build
targets:
    toolchain:
        pull: true
        build: docker/toolchain
        image: local-toolchain:latest

    toolchain-with-different-name:
        pull: evocloud/toolchain:latest
        build: docker/toolchain
        image: local-toolchain:latest

When pull is present (true or with an image) with build, the target will try to pull the image from remote, and re-tag it with name specified by image. If pull failed, it will fallback to build the image locally with build.

  1. Without build
targets:
    build:
        pull: true
        image: toolchain:latest
        cmds:
            - ...
    build-with-different-name:
        pull: evocloud/toolchain
        image: local-toolchain:latest
        cmds:
            - ...

When pull is present without build, the target will try pull the image first before creating the container. The behavior is the same as above, and the image will be tagged with name specified by image.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions