Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diagnostics 8gig speed and doc improvement #97

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ue4docker/diagnostics/diagnostic_8gig.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ def getDescription(self):
Returns a description of what the diagnostic does
'''
return '\n'.join([
'This diagnostic determines if the Docker daemon suffers from the 8GiB filesystem',
'layer bug reported here: https://github.com/moby/moby/issues/37581',
'This diagnostic determines if the Docker daemon suffers from one of the 8GiB filesystem',
'layer bugs reported at https://github.com/moby/moby/issues/37581 (affects all platforms) ',
'or https://github.com/moby/moby/issues/40444 (Windows containers only)',
'',
'This bug was fixed in Docker CE 18.09.0, but still exists in some versions of',
'Docker CE under Windows 10 and Docker EE under Windows Server.',
'#37581 was fixed in Docker CE 18.09.0, but #40444 has not been fixed as-of Docker CE 19.03.12',
'',
self._parser.format_help()
])
Expand Down
18 changes: 2 additions & 16 deletions ue4docker/dockerfiles/diagnostics/8gig/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,5 @@ SHELL ["cmd", "/S", "/C"]
# Add a sentinel label so we can easily identify intermediate images
LABEL com.adamrehn.ue4-docker.sentinel="1"

# Write an 8GiB file in blocks of 1GiB to avoid allocating too much memory in one hit
RUN powershell "`
$ErrorActionPreference = 'Stop';`
$writer = [System.IO.File]::OpenWrite('file');`
`
$random = new-object Random;`
$blockSize = 1073741824;`
$bytes = new-object byte[] $blockSize;`
for ($i=0; $i -lt 8; $i++)`
{`
$random.NextBytes($bytes);`
$writer.Write($bytes, 0, $blockSize);`
}`
`
$writer.Close();`
"
# Write an 8GiB sparse file
RUN powershell "fsutil.exe file createnew file 8589934592"