I am using the wget
inside the Dockerfile
FROM wso2/wso2mi:4.0.0
COPY /lib/* $WSO2_SERVER_HOME/lib/
COPY /carFiles/common-20.11.0-SNAPSHOT.car $WSO2_SERVER_HOME/repository/deployment/server/carbonapps/
COPY jdk8.tar.gz $WORKING_DIRECTORY/
#Download and configure Java 8
RUN \
# wget -O jdk8.tar.gz github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u292b10.tar.gz; \
mkdir -p ${WORKING_DIRECTORY}/openjdk-8; \
cd ${WORKING_DIRECTORY}/openjdk-8; \
tar -xf ${WORKING_DIRECTORY}/jdk8.tar.gz --strip-components=1; \
export PATH=${WORKING_DIiRECTORY}/openjdk-8/bin:$PATH; \
rm ${WORKING_DIRECTORY}/jdk8.tar.gz;
ENV JAVA_HOME=${WORKING_DIRECTORY}/openjdk-8 \
PATH=${WORKING_DIRECTORY}/openjdk-8/bin:$PATH
But its failing with the error
wget: bad address 'github.com' tar: can't open '/home/wso2carbon/jdk8.tar.gz': No such file or directory rm: can't remove '/home/wso2carbon/jdk8.tar.gz': No such file or directory
i am trying to build the image with this Docker command
docker build -f Dockerfile -t myimage:21.0.82 .
then as per the another SO post
docker build -f Dockerfile -t myimage:21.0.82 --network host .
this also failed with same issue .
If directly i am using
wget -O jdk8.tar.gz https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u292b10.tar.gz;
its working fine without any issue . Is this a Dockerfile
issue or wget
?
Even this SO post not helped .