def action_build(image_name, image_tag, dockerfile_name, docker_path):
    """The function action_build builds the image
    Arguments:
        image_name: Name of the image file.
        image_tag: Tag of the build image file.
        dockerfile_name: This is the Dockerfile to be used for building the image.
        docker_path: working directory of docker.
    """

    image_name_with_tag = image_name + ":" + image_tag
    build_command_list = [
        "docker",
        "build",
        "-t",
        image_name_with_tag,
        "-f",
        dockerfile_name,
        docker_path,
    ]
    return build_command_list