【问题标题】:Unable to locate package gluu-server无法找到软件包 gluu-server
【发布时间】:2020-01-08 11:33:26
【问题描述】:

我是 mac 用户,gluu 无法安装在 mac 上,所以我尝试在 Dockerfile 中将它安装在 ubuntu 上:

FROM ubuntu:16.04
RUN  apt-get update
RUN  apt-get upgrade
RUN apt-get install -y \
        curl \
        openssl \
        ca-certificates

RUN echo "deb https://repo.gluu.org/ubuntu/ bionic main" > /etc/apt/sources.list.d/gluu-repo.list
RUN curl https://repo.gluu.org/ubuntu/gluu-apt.key | apt-key add -
RUN  apt-get install gluu-server

但我在终端收到此错误:

E: Unable to locate package gluu-server
The command '/bin/sh -c apt-get install gluu-server' returned a non-zero code: 100

谁能帮帮我?

【问题讨论】:

    标签: ubuntu gluu


    【解决方案1】:

    这应该可行

    FROM ubuntu:16.04
    RUN  apt-get update
    RUN  apt-get upgrade -y
    RUN apt-get install \
            curl \
            openssl \
            ca-certificates \
            apt-transport-https -y
    
    
    RUN echo "deb https://repo.gluu.org/ubuntu/ bionic main" > /etc/apt/sources.list.d/gluu-repo.list
    RUN curl https://repo.gluu.org/ubuntu/gluu-apt.key | apt-key add -
    RUN  apt-get update
    RUN  apt-get install gluu-server -y
    

    【讨论】:

      【解决方案2】:

      请将 RUN apt-get install gluu-server 行更改为 RUN apt-get install gluu-server-3.1.0,如果它不起作用除了在 RUN curl https://repo.gluu.org/ubuntu/gluu-apt.key | 之后添加这个 RUN apt-get install apt-transport-https apt-key 添加 -.

      你创建这个 docker 镜像的方式也不是那么理想,你创建了这么多不推荐的层,不要在生产环境中这样做

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-03-05
        • 2019-10-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多