I've narrowed down a problem in an originally more involved setup. Consider the following Dockerfile:
# Dockerfile
FROM ubuntu:12.10
RUN apt-get install -y puppetmaster sudo
RUN rm -rf /etc/puppet
ADD puppet-config /etc/puppet
RUN chown -R puppet.puppet /etc/puppet
RUN chmod 755 /etc/puppet
When run with the following:
# make a dummy directory
mkdir puppet-config
echo "hi" >puppet-config/hello.txt
docker build -t dockbug .
echo "note the directory is owned by puppet with full read/write/execute privs"
docker run dockbug ls -al /etc/puppet
echo "but we get a permission error here"
docker run dockbug sudo -u puppet ls -al /etc/puppet
I see an unexpected permission error in the final command. This is with Docker 0.3.4 from the PPA on Ubuntu 13.04 with kernel 3.8.0-19-generic. Interestingly, if I remove the like "RUN rm -rf /etc/puppet" from the Dockerfile, I no longer see the permission error.
I've narrowed down a problem in an originally more involved setup. Consider the following Dockerfile:
When run with the following:
I see an unexpected permission error in the final command. This is with Docker 0.3.4 from the PPA on Ubuntu 13.04 with kernel 3.8.0-19-generic. Interestingly, if I remove the like "RUN rm -rf /etc/puppet" from the Dockerfile, I no longer see the permission error.