0

I am not able to run the following command in the dockerfile.

RUN apt-get update && \
    apt-get -y install curl && \
    curl http://nginx.org/keys/nginx_signing.key | apt-key add - && \
    apt-get update && \
    apt-get -y install build-essential libpq-dev nginx supervisor && \
    rm -rf /var/lib/apt/lists/*

I get an error like this...

Err:5 http://nginx.org/packages/debian jessie InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62
Reading package lists...
W: GPG error: http://nginx.org/packages/debian jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62
E: The repository 'http://nginx.org/packages/debian jessie InRelease' is not signed.
The command '/bin/sh -c apt-get update &&     apt-get -y install curl &&     curl http://nginx.org/keys/nginx_signing.key | apt-key add - &&     apt-get update &&     apt-get -y install build-essential libpq-dev nginx supervisor &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

I need to build the docker image in order to run the compose file that I found here...

https://github.com/yoanisgil/easygeoip

shantanuo
  • 31,689
  • 78
  • 245
  • 403

1 Answers1

1

use this instead

FROM python:2.7-slim
RUN apt-get update && \
    apt-get -y install wget gnupg && \
    wget https://nginx.org/keys/nginx_signing.key && \
    cat nginx_signing.key | apt-key add - && \
    apt-get update && \
    apt-get -y install build-essential libpq-dev nginx supervisor && \
    rm -rf /var/lib/apt/lists/* 

I think your curl did not produced the correct file

LinPy
  • 16,987
  • 4
  • 43
  • 57