Skip to content

Commit

Permalink
Add --docker-build-args option to passthrough docker build arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
slonopotamus committed Nov 22, 2023
1 parent 4ab089a commit 168960a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/ue4-docker-build.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ Combine generated Dockerfiles into a single multi-stage build Dockerfile
*-conan-ue4cli* _conan_ue4cli_::
Override the default version of conan-ue4cli installed in the ue4-full image

*--docker-build-args*::
Allows passing custom args to `docker build` command.
For example, this can be useful for pushing images.

*--dry-run*::
Use this if you would like to see what Docker commands would be run by `ue4-docker build` without actually building anything.
Execution will proceed as normal, but no Git credentials will be requested and all Docker commands will be printed to standard output instead of being executed as child processes.
Expand Down
2 changes: 1 addition & 1 deletion src/ue4docker/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def build():
commonArgs = [
"--build-arg",
"NAMESPACE={}".format(GlobalConfiguration.getTagNamespace()),
]
] + config.args.docker_build_args

# Build the UE4 build prerequisites image
if config.buildTargets["build-prerequisites"]:
Expand Down
6 changes: 6 additions & 0 deletions src/ue4docker/infrastructure/BuildConfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ def addArguments(parser):
action="store_true",
help="Use a random memory limit for Windows containers",
)
parser.add_argument(
"--docker-build-args",
action="append",
default=[],
help="Specify additional options for 'docker build' commands"
)
parser.add_argument(
"--exclude",
action="append",
Expand Down

0 comments on commit 168960a

Please sign in to comment.