Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法使用dockerfile在heroku上推送clojure项目_Docker_Leiningen - Fatal编程技术网

无法使用dockerfile在heroku上推送clojure项目

无法使用dockerfile在heroku上推送clojure项目,docker,leiningen,Docker,Leiningen,我有以下Dockerfile: # We will use Ubuntu for our image FROM ubuntu:latest # Updating Ubuntu packages ARG CLOJURE_TOOLS_VERSION=1.10.1.507 RUN apt-get -qq update && apt-get -qq -y install curl wget bzip2 openjdk-8-jdk-headless \ &&

我有以下Dockerfile:

# We will use Ubuntu for our image
FROM ubuntu:latest

# Updating Ubuntu packages

ARG CLOJURE_TOOLS_VERSION=1.10.1.507


RUN apt-get -qq update && apt-get -qq -y install curl wget bzip2 openjdk-8-jdk-headless \
    && curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh \
    #    && curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o /tmp/miniconda.sh \
    && bash /tmp/miniconda.sh -bfp /usr/local \
    && rm -rf /tmp/miniconda.sh \
    && conda install -y python=3 \
    && conda update conda \
    && curl -o install-clojure https://download.clojure.org/install/linux-install-${CLOJURE_TOOLS_VERSION}.sh \
    && chmod +x install-clojure \
    && ./install-clojure && rm install-clojure \
    # no need to install lein 
    && wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein \
    && chmod a+x lein \
    && mv lein /usr/bin \


    && apt-get -qq -y autoremove \
    && apt-get autoclean \
    && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log \
    && conda clean --all --yes

    

ENV PATH /opt/conda/bin:$PATH

RUN conda create -n pyclj python=3.7 && conda install -n pyclj numpy mxnet \
    && conda install -c conda-forge opencv
## To install pip packages into the pyclj environment do
RUN conda run -n pyclj python3 -mpip install numpy opencv-python

FROM openjdk:8-alpine
RUN lein uberjar
COPY target/uberjar/vendo.jar /vendo/app.jar

EXPOSE 3000

CMD ["java", "-jar", "/vendo/app.jar", "--server.port=$PORT"]
我正在使用git push heroku master推进我的项目,我得到了错误:

remote: Step 8/11 : RUN lein uberjar        
remote:  ---> Running in 07533c6b0e9c        
remote: /bin/sh: lein: not found        
remote: The command '/bin/sh -c lein uberjar' returned a non-zero code: 127        


表明lein没有被安装。第一次运行命令中的wget应该安装lein。如何解决此问题?

您需要添加一个
RUN lein
来运行自安装。

您需要添加一个
RUN lein
来运行自安装。

我在运行lein uberjar之前添加了它,但它给运行lein行带来了相同的错误我在运行lein uberjar之前添加了它,但给运行lein带来了相同的错误线