Command `docker build` is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Fix Released
|
Medium
|
Kick In | ||
Ubuntu Core Project |
New
|
Undecided
|
Unassigned |
Bug Description
Firstly, as the shell wrapper for docker currently does `cd /apps/docker/
ubuntu@
FROM errordeveloper/
ADD ./ /app/
EXPOSE 80
ubuntu@
ubuntu@
2015/01/19 08:37:03 no Dockerfile found in ./
Secondly, passing absolute path give "permission denied" error:
docker build -t hello-es-app `pwd`
2015/01/19 08:37:24 Error checking context is accessible: 'can't stat '/home/
affects: | snappy-ubuntu → snappy |
Clearly it's caused by the current security policy: localdomain kernel: audit: type=1400 audit(142165666 6.123:11) : apparmor="DENIED" operation="open" profile= "docker_ docker_ 1.3.3.001" name="/ home/ubuntu/ weave-demos- master/ hello-apps/ elasticsearch- js/" pid=4293 comm="docker" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Jan 19 08:37:46 localhost.
I would be less surprised if the policy did not allow to pass `-v $(pwd):/vol` to `docker run`, but that actually works, which is arguably more of security thread then `docker build $(pwd)`...