diff --git a/ue4docker/build.py b/ue4docker/build.py index c98b37a7..e42f4fc1 100644 --- a/ue4docker/build.py +++ b/ue4docker/build.py @@ -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" ) diff --git a/ue4docker/diagnostics/diagnostic_20gig.py b/ue4docker/diagnostics/diagnostic_20gig.py index b7372565..42539a01 100644 --- a/ue4docker/diagnostics/diagnostic_20gig.py +++ b/ue4docker/diagnostics/diagnostic_20gig.py @@ -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(), ] diff --git a/ue4docker/infrastructure/BuildConfiguration.py b/ue4docker/infrastructure/BuildConfiguration.py index 5bf8c713..4c88d2a0 100644 --- a/ue4docker/infrastructure/BuildConfiguration.py +++ b/ue4docker/infrastructure/BuildConfiguration.py @@ -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()