laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27771 )
Change subject: open5gs-latest: fix Dockerfile: avoid using curl for downloading keys ......................................................................
open5gs-latest: fix Dockerfile: avoid using curl for downloading keys
Since recently, curl fails to download the key from www.mongodb.org:
''' $ curl --verbose https://www.mongodb.org/static/pgp/server-4.2.asc GET /static/pgp/server-4.2.asc HTTP/1.1 Host: www.mongodb.org User-Agent: curl/7.82.0 Accept: */*
Mark bundle as not supporting multiuse HTTP/1.1 301 Moved Permanently Content-Type: text/html Date: Wed, 13 Apr 2022 20:50:19 GMT Location: https://pgp.mongodb.com/server-4.2.asc Connection: Keep-Alive Content-Length: 0 '''
By default, curl would not follow redirects unless '-L' is specified. Let's use Docker's 'ADD' command instead, like many Dockerfiles do. Also, update the address as suggested in the server's response.
Change-Id: I9757fcce084595341b1a68822bad454b64941eb1 Related: SYS#5602 --- M open5gs-latest/Dockerfile 1 file changed, 5 insertions(+), 4 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/open5gs-latest/Dockerfile b/open5gs-latest/Dockerfile index 325062f..66683b9 100644 --- a/open5gs-latest/Dockerfile +++ b/open5gs-latest/Dockerfile @@ -6,15 +6,16 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ ca-certificates \ - gnupg \ - curl -RUN curl https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/De... | apt-key add - -RUN curl https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add - + gnupg + +ADD https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/De... /tmp/Release.key +ADD https://pgp.mongodb.com/server-4.2.asc /tmp/server-4.2.asc
RUN echo "deb http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Deb... ./" \ > /etc/apt/sources.list.d/open5gs.list RUN echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" \ > /etc/apt/sources.list.d/mongodb-org.list +RUN apt-key add /tmp/Release.key && apt-key add /tmp/server-4.2.asc
RUN apt-get update && \ apt-get install -y \