Skip to content

DOCKER_BUILDKIT=1 docker build --squash should not squash the base image #38903

@AkihiroSuda

Description

@AkihiroSuda

Description

Steps to reproduce the issue:
DOCKER_BUILDKIT=1 docker build --iidfile /tmp/iid --squash . && docker save $(cat /tmp/iid) | tar t | grep layer.tar | wc -l

Describe the results you received:
1

Describe the results you expected:
2

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

Output of docker version:

Client:
 Version:           master-dockerproject-2019-03-18
 API version:       1.40
 Go version:        go1.11.6
 Git commit:        8c3a619d
 Built:             Mon Mar 18 23:39:36 2019
 OS/Arch:           linux/amd64
 Experimental:      true

Server:
 Engine:
  Version:          master-dockerproject-2019-03-18
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.1
  Git commit:       36d2c8b
  Built:            Mon Mar 18 23:46:08 2019
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          v1.2.5
  GitCommit:        bb71b10fd8f58240ca47fbb579b9d1028eea7c84
 runc:
  Version:          1.0.0-rc6+dev
  GitCommit:        8011af4a96d657f5ab1cff56273308dd1e13c9eb
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker info:

Client:
 Debug Mode: false

Server:
 Containers: 10
  Running: 0
  Paused: 0
  Stopped: 10
 Images: 53
 Server Version: master-dockerproject-2019-03-18
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runsc-kvm kata runc runnc runsc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84
 runc version: 8011af4a96d657f5ab1cff56273308dd1e13c9eb
 init version: fec3683
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 4.15.0-46-generic
 Operating System: Ubuntu 18.04.2 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 7.767GiB
 Name: suda-ws01
 ID: 59b7cdb8-1482-4653-a6ed-08d50b808573
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 22
  Goroutines: 43
  System Time: 2019-03-19T20:03:22.250407091+09:00
  EventsListeners: 0
 Username: akihirosuda
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/builderBuildkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.kind/experimental

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions