{"action":"created","issue":{"url":"https://api.github.com/repos/moby/moby/issues/36122","repository_url":"https://api.github.com/repos/moby/moby","labels_url":"https://api.github.com/repos/moby/moby/issues/36122/labels{/name}","comments_url":"https://api.github.com/repos/moby/moby/issues/36122/comments","events_url":"https://api.github.com/repos/moby/moby/issues/36122/events","html_url":"https://github.com/moby/moby/issues/36122","id":291862132,"number":36122,"title":"False caching with docker:build from tar","user":{"login":"guillaumerose","id":172624,"avatar_url":"https://avatars0.githubusercontent.com/u/172624?v=4","gravatar_id":"","url":"https://api.github.com/users/guillaumerose","html_url":"https://github.com/guillaumerose","followers_url":"https://api.github.com/users/guillaumerose/followers","following_url":"https://api.github.com/users/guillaumerose/following{/other_user}","gists_url":"https://api.github.com/users/guillaumerose/gists{/gist_id}","starred_url":"https://api.github.com/users/guillaumerose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guillaumerose/subscriptions","organizations_url":"https://api.github.com/users/guillaumerose/orgs","repos_url":"https://api.github.com/users/guillaumerose/repos","events_url":"https://api.github.com/users/guillaumerose/events{/privacy}","received_events_url":"https://api.github.com/users/guillaumerose/received_events","type":"User","site_admin":false},"labels":[{"id":73616520,"url":"https://api.github.com/repos/moby/moby/labels/area/builder","name":"area/builder","color":"fbca04","default":false},{"id":179237356,"url":"https://api.github.com/repos/moby/moby/labels/kind/enhancement","name":"kind/enhancement","color":"E8CAAF","default":false},{"id":381838255,"url":"https://api.github.com/repos/moby/moby/labels/platform/desktop","name":"platform/desktop","color":"F6FBFF","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-01-26T10:42:45Z","updated_at":"2018-02-19T12:40:21Z","closed_at":"2018-02-19T11:01:21Z","author_association":"NONE","body":"**Description**\r\n\r\nWhen creating a tarball by hand for docker build, if the path is in parent directory, build cache is never invalidated.\r\n\r\n**Steps to reproduce the issue:**\r\n1. Create a directory structure like this [parent.zip](https://github.com/moby/moby/files/1667460/parent.zip) : \r\n```\r\n$ tree\r\n.\r\n├── build.json\r\n└── child\r\n    ├── Dockerfile\r\n    └── Makefile\r\n$  cat build.json\r\nversion1\r\n$  cat child/Dockerfile\r\nFROM alpine\r\nCOPY build.json /\r\nRUN cat build.json\r\n$ cat child/Makefile\r\nall:\r\n\ttar cf - Dockerfile ../build.json | docker build -t child -\r\n``` \r\n2. Run `make`\r\n3. Change version in build.json\r\n4.  Run `make`. There is a cache hit.\r\n\r\n**Describe the results you received:**\r\n\r\nThe cache is used and the file not changed for the following steps\r\n\r\n**Describe the results you expected:**\r\n\r\nThe file should not be cached.\r\n\r\n**Output of `docker version`:**\r\n\r\n```\r\nClient:\r\n Version:\t17.12.0-ce\r\n API version:\t1.35\r\n Go version:\tgo1.9.2\r\n Git commit:\tc97c6d6\r\n Built:\tWed Dec 27 20:03:51 2017\r\n OS/Arch:\tdarwin/amd64\r\n\r\nServer:\r\n Engine:\r\n  Version:\t17.12.0-ce\r\n  API version:\t1.35 (minimum version 1.12)\r\n  Go version:\tgo1.9.2\r\n  Git commit:\tc97c6d6\r\n  Built:\tWed Dec 27 20:12:29 2017\r\n  OS/Arch:\tlinux/amd64\r\n  Experimental:\ttrue\r\n```\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\nContainers: 5\r\n Running: 0\r\n Paused: 0\r\n Stopped: 5\r\nImages: 41\r\nServer Version: 17.12.0-ce\r\nStorage Driver: overlay2\r\n Backing Filesystem: extfs\r\n Supports d_type: true\r\n Native Overlay Diff: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: bridge host ipvlan macvlan null overlay\r\n Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: 89623f28b87a6004d4b785663257362d1658a729\r\nrunc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f\r\ninit version: 949e6fa\r\nSecurity Options:\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.9.60-linuxkit-aufs\r\nOperating System: Docker for Mac\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 4\r\nTotal Memory: 1.952GiB\r\nName: linuxkit-025000000001\r\nID: K4IU:BYEJ:55LM:S3GN:MGG4:EWRW:BR2O:I5Z6:XB6K:WIMS:IMXT:STSK\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): true\r\n File Descriptors: 21\r\n Goroutines: 40\r\n System Time: 2018-01-26T10:41:17.898620973Z\r\n EventsListeners: 2\r\nHTTP Proxy: docker.for.mac.http.internal:3128\r\nHTTPS Proxy: docker.for.mac.http.internal:3129\r\nRegistry: https://index.docker.io/v1/\r\nLabels:\r\nExperimental: true\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\n\r\nUsing Docker for Mac\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/moby/moby/issues/comments/366681987","html_url":"https://github.com/moby/moby/issues/36122#issuecomment-366681987","issue_url":"https://api.github.com/repos/moby/moby/issues/36122","id":366681987,"user":{"login":"guillaumerose","id":172624,"avatar_url":"https://avatars0.githubusercontent.com/u/172624?v=4","gravatar_id":"","url":"https://api.github.com/users/guillaumerose","html_url":"https://github.com/guillaumerose","followers_url":"https://api.github.com/users/guillaumerose/followers","following_url":"https://api.github.com/users/guillaumerose/following{/other_user}","gists_url":"https://api.github.com/users/guillaumerose/gists{/gist_id}","starred_url":"https://api.github.com/users/guillaumerose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guillaumerose/subscriptions","organizations_url":"https://api.github.com/users/guillaumerose/orgs","repos_url":"https://api.github.com/users/guillaumerose/repos","events_url":"https://api.github.com/users/guillaumerose/events{/privacy}","received_events_url":"https://api.github.com/users/guillaumerose/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T12:40:21Z","updated_at":"2018-02-19T12:40:21Z","author_association":"NONE","body":"Thanks!"}}
{"actor":{"display_login":"guillaumerose"}}