Dockerfile Directives ENV header

Hi guys,

I was watching this video and I was wondering how you obtained the header from the following command used to build the Docker image:
RUN cd ~ && wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jre-8u60-linux-x64.rpm"
I think that this pattern can be used to download rpms from other vendors, right?

Many thanks,
Dan
  • post-author-pic
    Terrence C
    12-11-2018

    Depends. This was specific to the download site for Oracle and that specific version of Java. Oracle has changed their downloads (they really want a person to accept the license agreement and continually make changes to deter and undermine automated download scripts like this). Other sites may be easier or harder.


    However, you can use wget in many cases to download software in a variety of forms (RPM or otherwise) and then include processing/installing them in your Dockerfile for the image you are building!

Looking For Team Training?

Learn More