Dockerfile 464 B

12345678910
  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 mkdir /exists
  5. RUN touch /exists/exists_file
  6. RUN chown -R dockerio.dockerio /exists
  7. ADD test_file /exists/
  8. RUN [ $(ls -l / | grep exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ]
  9. RUN [ $(ls -l /exists/test_file | awk '{print $3":"$4}') = 'root:root' ]
  10. RUN [ $(ls -l /exists/exists_file | awk '{print $3":"$4}') = 'dockerio:dockerio' ]