3

我是 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

谁能帮我?

4

2 回答 2

2

这应该工作

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
于 2020-01-13T04:20:57.587 回答
1

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

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

于 2020-01-11T13:18:43.863 回答