mirror of
https://github.com/docker/compose.git
synced 2025-07-27 15:44:08 +02:00
Rename envvar switch to COMPOSE_DOCKER_CLI_BUILD
From `COMPOSE_NATIVE_BUILDER` to `COMPOSE_DOCKER_CLI_BUILD` Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
This commit is contained in:
parent
9d7ad3bac1
commit
5add9192ac
@ -272,7 +272,7 @@ class TopLevelCommand(object):
|
|||||||
--parallel Build images in parallel.
|
--parallel Build images in parallel.
|
||||||
--progress string Set type of progress output (auto, plain, tty).
|
--progress string Set type of progress output (auto, plain, tty).
|
||||||
EXPERIMENTAL flag for native builder.
|
EXPERIMENTAL flag for native builder.
|
||||||
To enable, run with COMPOSE_NATIVE_BUILDER=1)
|
To enable, run with COMPOSE_DOCKER_CLI_BUILD=1)
|
||||||
--pull Always attempt to pull a newer version of the image.
|
--pull Always attempt to pull a newer version of the image.
|
||||||
-q, --quiet Don't print anything to STDOUT
|
-q, --quiet Don't print anything to STDOUT
|
||||||
"""
|
"""
|
||||||
@ -286,7 +286,7 @@ class TopLevelCommand(object):
|
|||||||
)
|
)
|
||||||
build_args = resolve_build_args(build_args, self.toplevel_environment)
|
build_args = resolve_build_args(build_args, self.toplevel_environment)
|
||||||
|
|
||||||
native_builder = self.toplevel_environment.get_boolean('COMPOSE_NATIVE_BUILDER')
|
native_builder = self.toplevel_environment.get_boolean('COMPOSE_DOCKER_CLI_BUILD')
|
||||||
|
|
||||||
self.project.build(
|
self.project.build(
|
||||||
service_names=options['SERVICE'],
|
service_names=options['SERVICE'],
|
||||||
@ -1078,7 +1078,7 @@ class TopLevelCommand(object):
|
|||||||
for excluded in [x for x in opts if options.get(x) and no_start]:
|
for excluded in [x for x in opts if options.get(x) and no_start]:
|
||||||
raise UserError('--no-start and {} cannot be combined.'.format(excluded))
|
raise UserError('--no-start and {} cannot be combined.'.format(excluded))
|
||||||
|
|
||||||
native_builder = self.toplevel_environment.get_boolean('COMPOSE_NATIVE_BUILDER')
|
native_builder = self.toplevel_environment.get_boolean('COMPOSE_DOCKER_CLI_BUILD')
|
||||||
|
|
||||||
with up_shutdown_context(self.project, service_names, timeout, detached):
|
with up_shutdown_context(self.project, service_names, timeout, detached):
|
||||||
warn_for_swarm_mode(self.project.client)
|
warn_for_swarm_mode(self.project.client)
|
||||||
|
@ -369,10 +369,10 @@ class Project(object):
|
|||||||
log.warning("Native build is an experimental feature and could change at any time")
|
log.warning("Native build is an experimental feature and could change at any time")
|
||||||
if parallel_build:
|
if parallel_build:
|
||||||
log.warning("Flag '--parallel' is ignored when building with "
|
log.warning("Flag '--parallel' is ignored when building with "
|
||||||
"COMPOSE_NATIVE_BUILDER=1")
|
"COMPOSE_DOCKER_CLI_BUILD=1")
|
||||||
if gzip:
|
if gzip:
|
||||||
log.warning("Flag '--compress' is ignored when building with "
|
log.warning("Flag '--compress' is ignored when building with "
|
||||||
"COMPOSE_NATIVE_BUILDER=1")
|
"COMPOSE_DOCKER_CLI_BUILD=1")
|
||||||
|
|
||||||
def build_service(service):
|
def build_service(service):
|
||||||
service.build(no_cache, pull, force_rm, memory, build_args, gzip, rm, silent, cli, progress)
|
service.build(no_cache, pull, force_rm, memory, build_args, gzip, rm, silent, cli, progress)
|
||||||
|
@ -978,7 +978,7 @@ class ServiceTest(DockerClientTestCase):
|
|||||||
service = self.create_service('web',
|
service = self.create_service('web',
|
||||||
build={'context': base_dir},
|
build={'context': base_dir},
|
||||||
environment={
|
environment={
|
||||||
'COMPOSE_NATIVE_BUILDER': '1',
|
'COMPOSE_DOCKER_CLI_BUILD': '1',
|
||||||
'DOCKER_BUILDKIT': '1',
|
'DOCKER_BUILDKIT': '1',
|
||||||
})
|
})
|
||||||
service.build(cli=True)
|
service.build(cli=True)
|
||||||
@ -995,7 +995,7 @@ class ServiceTest(DockerClientTestCase):
|
|||||||
web = self.create_service('web',
|
web = self.create_service('web',
|
||||||
build={'context': base_dir},
|
build={'context': base_dir},
|
||||||
environment={
|
environment={
|
||||||
'COMPOSE_NATIVE_BUILDER': '1',
|
'COMPOSE_DOCKER_CLI_BUILD': '1',
|
||||||
'DOCKER_BUILDKIT': '1',
|
'DOCKER_BUILDKIT': '1',
|
||||||
})
|
})
|
||||||
project = Project('composetest', [web], self.client)
|
project = Project('composetest', [web], self.client)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user