3

I am mac user and gluu can't be installed on mac so i tried to install it on ubuntu in Dockerfile:

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

but i get this error in terminal:

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

can anyone help me?

Mohammad Ranjbar Z
  • 1,487
  • 1
  • 10
  • 20
fateme ghasemi
  • 243
  • 1
  • 4
  • 9

2 Answers2

2

This should work

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
1

Please just change the line RUN apt-get install gluu-server to RUN apt-get install gluu-server-3.1.0, if it doesn’t work besides add this RUN apt-get install apt-transport-https after RUN curl https://repo.gluu.org/ubuntu/gluu-apt.key | apt-key add -.

also the way you are creating this docker image is not so much optimal, you are creating so many layers which is not recommended, don’t do like this in production environments