Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Costa__Luís
Beginner
62 Views

Dockerfile

Is it possible to have the Dockerfile for this OpenVINO image?

 

https://hub.docker.com/r/openvino/ubuntu18_dev

 

Regards

0 Kudos
1 Reply
SIRIGIRI_V_Intel
Employee
62 Views

You can try using the below command:

sudo docker history <image_name> --no-trunc $argv  | tac | tr -s ' ' | cut -d " " -f 5- | sed 's,^/bin/sh -c #(nop) ,,g' | sed 's,^/bin/sh -c,RUN,g' | sed 's, && ,\n  & ,g' | sed 's,\s*[0-9]*[\.]*[0-9]*\s*[kMG]*B\s*$,,g' | head -n -1

Below is the explanation for the arguments used in the above command

tac                                             :   reverse the file
tr -s ' '                                       :   trim multiple whitespaces into 1
cut -d " " -f 5-                                :   remove the first fields (until X months/years ago)
sed 's,^/bin/sh -c #(nop) ,,g'                  :   remove /bin/sh calls for ENV,LABEL...
sed 's,^/bin/sh -c,RUN,g'                       :   remove /bin/sh calls for RUN
sed 's, && ,\n  & ,g'                           :   pretty print multi command lines following Docker best practices
sed 's,\s*[0-9]*[\.]*[0-9]*\s*[kMG]*B\s*$,,g'   :   remove layer size information
head -n -1                                      :   remove last line ("SIZE COMMENT" in this case)

It may not contain everything to fully understand how the image was generated. however it can extract some parts of the Dockerfile.

Hope this helps

Regards,

Ram prasad

Reply