2017-10-29 2 views
1

Dockerfile에서 작업 중이며이 오류를 전달할 수 없습니다. 나는 오류에 관해 많이 연구했지만 해결책을 찾지 못하는 것 같습니다.Docker 컨테이너에서 Apache Cassandra를 실행하십시오.

코드 : 우분투 FROM
: 믿을 수

RUN echo "deb http://www.apache.org/dist/cassandra/debian 36x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list 
RUN sudo apt-get install -y curl nginx 
RUN sudo apt-get update 
RUN curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add - 
RUN sudo apt-get update 
RUN sudo apt-get install cassandra 
RUN sudo service cassandra -fR 

오류 : ...

E: Unable to locate package curl 
E: Unable to locate package nginx 
The command '/bin/sh -c sudo apt-get install -y curl nginx' returned a non-zero code: 100 

나는 컬과 nginx를 설치하고 있지만. 도와주세요

답변

1

말아 넣기 전에 apt-get update을 실행하십시오. 컬 설치는 컬 설치를 수행 할 때 최신이 아 U니다. 또한 캐스 산드라를 설치하려면 신뢰할 수있는 곳에서 openjdk-8-jre-headless을 얻어야합니다.

FROM ubuntu:trusty 
RUN echo "deb http://www.apache.org/dist/cassandra/debian 36x main" | tee -a /etc/apt/sources.list.d/cassandra.sources.list 
RUN apt-get update 
RUN apt-get install -y software-properties-common && add-apt-repository ppa:openjdk-r/ppa -y && apt-get update 
RUN apt-get install -y curl nginx 
RUN curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add - && sudo apt-get update 
RUN apt-get install -y cassandra 
RUN service cassandra start 
관련 문제