Skip to content

Commit

Permalink
Warn users about 20GiB COPY Docker bug (#255)
Browse files Browse the repository at this point in the history
See #99
  • Loading branch information
slonopotamus committed May 18, 2022
1 parent e31ce2e commit fff76b6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ue4docker/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def build():
)
sys.exit(1)
elif newer_check is None:
logger.info(
logger.warning(
"Warning: unable to determine whether host system is new enough to use specified base tag"
)

Expand Down
3 changes: 1 addition & 2 deletions ue4docker/diagnostics/diagnostic_20gig.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ def getDescription(self):
return "\n".join(
[
"This diagnostic determines if the Docker daemon suffers from 20GiB COPY bug",
"reported at https://github.com/moby/moby/issues/37352 (affects Windows containers only)",
"",
"#37352 was fixed in https://github.com/moby/moby/pull/41636 but that fix was not released yet",
"See https://github.com/adamrehn/ue4-docker/issues/99#issuecomment-1079702817 for details and workarounds",
"",
self._parser.format_help(),
]
Expand Down
27 changes: 27 additions & 0 deletions ue4docker/infrastructure/BuildConfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,33 @@ def __init__(self, parser, argv, logger):
"templates": ExcludedComponent.Templates in self.excludedComponents,
}

# Warn user that they are in danger of Docker 20GB COPY bug
# Unfortunately, we don't have a cheap way to check whether user environment is affected
# See https://github.com/adamrehn/ue4-docker/issues/99
if self.containerPlatform == "windows":
warn20GiB = False
if ExcludedComponent.Debug not in self.excludedComponents:
logger.warning("Warning: You didn't pass --exclude debug", False)
warn20GiB = True
if (
self.release
and not self.custom
and semver.VersionInfo.parse(self.release) >= semver.VersionInfo(5, 0)
):
logger.warning("Warning: You're building Unreal Engine 5", False)
warn20GiB = True

if warn20GiB:
logger.warning("Warning: You might hit Docker 20GiB COPY bug", False)
logger.warning(
"Warning: Make sure that `ue4-docker diagnostics 20gig` passes",
False,
)
logger.warning(
"Warning: See https://github.com/adamrehn/ue4-docker/issues/99#issuecomment-1079702817 for details and workarounds",
False,
)

# If we're building Windows containers, generate our Windows-specific configuration settings
if self.containerPlatform == "windows":
self._generateWindowsConfig()
Expand Down

0 comments on commit fff76b6

Please sign in to comment.