Dockerfile:5
--------------------
3 | RUN mkdir /opt/tomcat
4 | WORKDIR /opt/tomcat
5 | >>> ADD https://dlcdn.apache.org/tomcat/tomcat-10/v10.1.28/bin/apache-tomcat-10.1.28.tar.gz
6 | RUN tar -xvzf apache-tomcat-10.1.28.tar.gz
7 | RUN mv apache-tomcat-10.1.28/* /opt/tomcat
--------------------
ERROR: failed to solve: dockerfile parse error on line 5: ADD requires at least two arguments, but only one was provided. Destination could not be determined
Created a dockerfile as above and ran build to create docker image and it returned with the above error. Below are the contents of my dockerfile:
FROM centos:latest
RUN yum install java -y
RUN mkdir /opt/tomcat
WORKDIR /opt/tomcat
ADD https://dlcdn.apache.org/tomcat/tomcat-10/v10.1.28/bin/apache-tomcat-10.1.28.tar.gz
RUN tar -xvzf apache-tomcat-10.1.28.tar.gz
RUN mv apache-tomcat-10.1.28/* /opt/tomcat
EXPOSE 8080
CMD ["/opt/tomcat/bin/catalina.sh", "run"]
ADD
takes two parameters, just as the error message says. You probably want just .
, the current directory, as the destination, given the following lines.
ADD https://dlcdn.apache.org/tomcat/tomcat-10/v10.1.28/bin/apache-tomcat-10.1.28.tar.gz .
Add this----^^^