正在尝试在docker中安装avro bin。继续收到此错误
E: Unable to locate package avro-bin
The command '/bin/sh -c add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic universe' && apt-get install avro-bin jq' returned a non-zero code: 100 FROM maven:3.6.3-jdk-11
USER root
RUN adduser jenkins
RUN apt-get update && \
apt-get install -y software-properties-common
RUN apt-get update && apt-get install -y apt-transport-https
RUN add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic universe' && \
apt-get install avro-bin jq
COPY jenkins-slave /usr/local/bin/jenkins-slave
RUN chown jenkins:jenkins /usr/local/bin/jenkins-slave
RUN chmod 777 /usr/local/bin/jenkins-slave
RUN chmod 777 /home/jenkins
WORKDIR /home/jenkins
USER jenkins
RUN ls -ltr /usr/local/bin/jenkins-slave
ENTRYPOINT ["/usr/local/bin/jenkins-slave"]发布于 2020-01-30 01:30:28
下面粘贴我的新docker文件,它解决了这个问题
FROM adoptopenjdk/openjdk11:latest
USER root
RUN adduser jenkins
RUN apt-get clean
RUN apt-get update
RUN apt-get -y install avro-bin
RUN apt-get -f install
RUN apt-get install jq -y
RUN apt-get clean all -y
RUN apt-get install wget -y
RUN wget https://apache.osuosl.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -P /tmp
RUN tar xf /tmp/apache-maven-3.6.3-bin.tar.gz -C /opt
RUN ln -s /opt/apache-maven-3.6.3 /opt/maven
RUN ln -s /opt/maven/bin/mvn /usr/local/bin
RUN rm -f /tmp/apache-maven-3.6.3-bin.tar.gz
ENV MAVEN_HOME=/opt/maven
RUN chown -R jenkins:jenkins /opt/maven
COPY jenkins-slave /usr/local/bin/jenkins-slave
RUN chown jenkins:jenkins /usr/local/bin/jenkins-slave
RUN chmod 777 /usr/local/bin/jenkins-slave
RUN chmod 777 /home/jenkins
WORKDIR /home/jenkins
USER jenkins
RUN ls -ltr /usr/local/bin/jenkins-slave
ENTRYPOINT ["/usr/local/bin/jenkins-slave"]https://stackoverflow.com/questions/59924643
复制相似问题