Dockerfile 414 B

123456789
  1. FROM busybox
  2. RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd
  3. RUN echo 'dockerio:x:1001:' >> /etc/group
  4. RUN touch /exists
  5. RUN chown dockerio.dockerio exists
  6. ADD test_dir /test_dir
  7. RUN [ $(ls -l / | grep test_dir | awk '{print $3":"$4}') = 'root:root' ]
  8. RUN [ $(ls -l /test_dir/test_file | awk '{print $3":"$4}') = 'root:root' ]
  9. RUN [ $(ls -l /exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ]