运行 来自 git 的 docker 容器上的 petstore webapp 使用 maven
running petstore webapp from git on docker container using maven
我正在尝试将 petstore 网络应用程序捆绑在图像中,然后 运行 它在容器中。 petstore是maven项目。
我创建了以下 Dockerfile
FROM ubuntu:18.04
MAINTAINER Naresh Chaurasia <message4naresh@gmail.com>
RUN apt update
RUN apt install -y openjdk-8-jdk
RUN apt install -y maven
RUN apt install -y git
RUN git clone https://bitbucket.org/connect2tech/connect2tech.in-jpetstore
WORKDIR /connect2tech.in-jpetstore
ENV PATH "$PATH:/usr/bin/mvn"
ENTRYPOINT ["mvn","jetty:run"]
通过运行以下命令将 Web 应用程序部署到端口 8080 的码头容器上:mvn jetty:run
我正在尝试对 Dockerfile 执行相同的操作,但没有成功。
我可能在以下几行中犯了错误,但无法弄清楚(因为我刚刚开始使用 Dockers)
ENV PATH "$PATH:/usr/bin/mvn"
ENTRYPOINT ["mvn","jetty:run"]
任何 guidance/pointer 将不胜感激。
谢谢。
FROM ubuntu:18.04
MAINTAINER Naresh Chaurasia <message4naresh@gmail.com>
RUN apt update
RUN apt install -y openjdk-8-jdk maven git
RUN git clone https://bitbucket.org/connect2tech/connect2tech.in-jpetstore
RUN mkdir /connect2tech.in-jpetstore
WORKDIR /connect2tech.in-jpetstore
ENTRYPOINT ["/usr/bin/mvn","jetty:run"]
我正在尝试将 petstore 网络应用程序捆绑在图像中,然后 运行 它在容器中。 petstore是maven项目。
我创建了以下 Dockerfile
FROM ubuntu:18.04
MAINTAINER Naresh Chaurasia <message4naresh@gmail.com>
RUN apt update
RUN apt install -y openjdk-8-jdk
RUN apt install -y maven
RUN apt install -y git
RUN git clone https://bitbucket.org/connect2tech/connect2tech.in-jpetstore
WORKDIR /connect2tech.in-jpetstore
ENV PATH "$PATH:/usr/bin/mvn"
ENTRYPOINT ["mvn","jetty:run"]
通过运行以下命令将 Web 应用程序部署到端口 8080 的码头容器上:mvn jetty:run
我正在尝试对 Dockerfile 执行相同的操作,但没有成功。
我可能在以下几行中犯了错误,但无法弄清楚(因为我刚刚开始使用 Dockers)
ENV PATH "$PATH:/usr/bin/mvn"
ENTRYPOINT ["mvn","jetty:run"]
任何 guidance/pointer 将不胜感激。
谢谢。
FROM ubuntu:18.04
MAINTAINER Naresh Chaurasia <message4naresh@gmail.com>
RUN apt update
RUN apt install -y openjdk-8-jdk maven git
RUN git clone https://bitbucket.org/connect2tech/connect2tech.in-jpetstore
RUN mkdir /connect2tech.in-jpetstore
WORKDIR /connect2tech.in-jpetstore
ENTRYPOINT ["/usr/bin/mvn","jetty:run"]