Skip to content

'--compress', '-f -' and context do not play along #33706

@RomanSaveljev

Description

@RomanSaveljev

Description

Docker build fails.
A command like this will fail:

docker build -t xxx -f - --compress . <Dockerfile

Steps to reproduce the issue:

  1. My Dockerfile has a single FROM alpine statement
  2. There is no other files in the context (.) folder
  3. Run docker build --verbose -t xxx -f - --compress . <Dockerfile

Describe the results you received:

$ docker build -t xxx -f - --compress . <Dockerfile
Sending build context to Docker daemon 

error during connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.29/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=.dockerfile.894e5d7100166c80399a&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=xxx&target=&ulimits=null: unexpected EOF

Describe the results you expected:

Successful build

Additional information you deem important (e.g. issue happens only occasionally):

Happens every time

Output of docker version:

Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64
 Experimental: false

Output of docker info:

Containers: 1018
 Running: 0
 Paused: 0
 Stopped: 1018
Images: 8576
Server Version: 17.05.0-ce
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 5187
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-64-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 990.6MiB
Name: systest-tools-releases-bot
ID: MJ4N:O2KV:ZZXR:FHNU:TY6U:D57G:OKMV:KB2O:QLU4:DGYZ:MVLF:T336
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

Additional environment details (AWS, VirtualBox, physical, etc.):

Docker engine runs in AWS node

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/builderBuildarea/cliClientkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.version/17.05

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions