Невозможно установить avro-bin в docker - PullRequest
0 голосов
/ 27 января 2020

Попытка установить avro bin в docker. Продолжайте получать эту ошибку

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"]

1 Ответ

0 голосов
/ 29 января 2020

Ниже вставлен мой новый 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"]
...