首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在docker中安装avro-bin

无法在docker中安装avro-bin
EN

Stack Overflow用户
提问于 2020-01-27 10:40:33
回答 1查看 50关注 0票数 0

正在尝试在docker中安装avro bin。继续收到此错误

代码语言:javascript
复制
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
代码语言:javascript
复制
    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"]
EN

回答 1

Stack Overflow用户

发布于 2020-01-30 01:30:28

下面粘贴我的新docker文件,它解决了这个问题

代码语言:javascript
复制
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"]
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59924643

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档