'Build or rebuild services.
Services are built once and then tagged as `project_service`,
e.g. `composetest_db`. If you change a service\'s `Dockerfile` or the
contents of its build directory, you can run `docker-compose build` to rebuild it.
Usage: build [options] [--build-arg key=val...] [SERVICE...]
Options:
--force-rm              Always remove intermediate containers.
--no-cache              Do not use cache when building the image.
--pull                  Always attempt to pull a newer version of the image.
--build-arg key=val     Set build-time variables for one service.'

def build(self, options):

    service_names = options[u'SERVICE']
    build_args = options.get(u'--build-arg', None)
    if build_args:
        environment = Environment.from_env_file(self.project_dir)
        build_args = resolve_build_args(build_args, environment)
    if ((not service_names) and build_args):
        raise UserError(u'Need    service    name    for    --build-arg    option')
    self.project.build(service_names=service_names, no_cache=bool(options.get(u'--no-cache', False)), pull=bool(options.get(u'--pull', False)), force_rm=bool(options.get(u'--force-rm', False)), build_args=build_args)
