code: public static List<DockerCommand> dockerfileToCommandList( File dockerfile ) throws IOException {
  
  		List<DockerCommand> result = new ArrayList<>();
  		FileInputStream in = new FileInputStream( dockerfile );
  		Logger logger = Logger.getLogger( DockerfileParser.class.getName());
  		BufferedReader br = null;
  
  		try {
  			br = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 ));
  			String line;
  			while((line = br.readLine()) != null) {
  
  				DockerCommand cmd = DockerCommand.guess(line);
  				if( cmd != null )
  					result.add( cmd );
  				else
  					logger.fine("Ignoring unsupported Docker instruction: " + line );
  			}
  
  		} finally {
  			Utils.closeQuietly( br );
  			Utils.closeQuietly( in );
  		}
  
  		return result;
  	}
docs: Parses a dockerfile to a list of commands.
  @throws IOException
  @param dockerfile a file
  @return a list of Docker commands