Description
When using Docker v24 on Windows Server 2022, setting DOCKER_TMPDIR successfully causes Docker to write temporary data to the configured tempdir, e.g. when pulling images.
Since v25, this appears to have stopped working, and all temp data is being incorrectly written to C:\Windows\SystemTemp.
Reproduce
- On Windows Server 2022 with a secondary drive e.g.
D:, configure v26 daemon with "data-root": "D:\\docker"
- Set
DOCKER_TMPDIR=D:\tmp system-wide
- docker pull mcr.microsoft.com/windows/server:ltsc2022
- dir C:\Windows\SystemTemp\
- Observe temporary files (e.g.
GetImageBlob1051740717) being created
Expected behavior
Temporary files should be created in D:\temp, not in C:\Windows\SystemTemp
docker version
Client:
Version: 26.1.0
API version: 1.45
Go version: go1.21.9
Git commit: 9714adc
Built: Mon Apr 22 17:07:39 2024
OS/Arch: windows/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 26.1.0
API version: 1.45 (minimum version 1.24)
Go version: go1.21.9
Git commit: c8af8eb
Built: Mon Apr 22 17:06:23 2024
OS/Arch: windows/amd64
Experimental: false
docker info
Client:
Version: 26.1.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.15.0
Path: C:\Program Files\Docker\cli-plugins\docker-buildx.exe
compose: Docker Compose (Docker Inc.)
Version: v2.27.1
Path: C:\Program Files\Docker\cli-plugins\docker-compose.exe
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 2
Server Version: 26.1.0
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local splunk syslog
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 20348 (20348.1.amd64fre.fe_release.210507-1500)
Operating System: Microsoft Windows Server Version 21H2 (OS Build 20348.2527)
OSType: windows
Architecture: x86_64
CPUs: 16
Total Memory: 30.98GiB
Name: wc54xlrg1
ID: 9ba3342f-6a6b-4576-9c6a-4cec42c342b8
Docker Root Dir: D:\docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Additional Info
No response
Description
When using Docker v24 on Windows Server 2022, setting
DOCKER_TMPDIRsuccessfully causes Docker to write temporary data to the configured tempdir, e.g. when pulling images.Since v25, this appears to have stopped working, and all temp data is being incorrectly written to
C:\Windows\SystemTemp.Reproduce
D:, configure v26 daemon with"data-root": "D:\\docker"DOCKER_TMPDIR=D:\tmpsystem-wideGetImageBlob1051740717) being createdExpected behavior
Temporary files should be created in
D:\temp, not inC:\Windows\SystemTempdocker version
Client: Version: 26.1.0 API version: 1.45 Go version: go1.21.9 Git commit: 9714adc Built: Mon Apr 22 17:07:39 2024 OS/Arch: windows/amd64 Context: default Server: Docker Engine - Community Engine: Version: 26.1.0 API version: 1.45 (minimum version 1.24) Go version: go1.21.9 Git commit: c8af8eb Built: Mon Apr 22 17:06:23 2024 OS/Arch: windows/amd64 Experimental: falsedocker info
Additional Info
No response