Dockerfile 388 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_file /
  7. RUN [ $(ls -l /test_file | awk '{print $3":"$4}') = 'root:root' ]
  8. RUN [ $(ls -l /test_file | awk '{print $1}') = '-rwxr-xr-x' ]
  9. RUN [ $(ls -l /exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ]