Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build Nginx Plus image #162

Closed
sjdweb opened this issue Aug 3, 2017 · 4 comments
Closed

Cannot build Nginx Plus image #162

sjdweb opened this issue Aug 3, 2017 · 4 comments

Comments

@sjdweb
Copy link

sjdweb commented Aug 3, 2017

When trying to build the provided DockerfileForPlus, I get the following apt-get error:

Step 8/14 : RUN apt-get update && apt-get install -y nginx-plus nginx-plus-module-modsecurity
 ---> Running in 45245081cbc6
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Ign:5 https://plus-pkgs.nginx.com/ubuntu xenial InRelease
Ign:6 https://plus-pkgs.nginx.com/ubuntu xenial Release
Ign:7 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
Ign:8 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Ign:7 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
Ign:8 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Ign:7 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
Ign:8 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Ign:7 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
Ign:8 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Ign:7 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
Ign:8 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Err:7 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
  error reading X.509 key or certificate file: Error while reading file.
Ign:8 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Reading package lists...
W: The repository 'https://plus-pkgs.nginx.com/ubuntu xenial Release' does not have a Release file.
E: Failed to fetch https://plus-pkgs.nginx.com/ubuntu/dists/xenial/nginx-plus/binary-amd64/Packages  error reading X.509 key or certificate file: Error while reading file.
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update && apt-get install -y nginx-plus nginx-plus-module-modsecurity' returned a non-zero code: 100

I also see an SSL error when going directly to

https://plus-pkgs.nginx.com/ubuntu/dists/xenial/nginx-plus/binary-amd64/Packages

@pleshakov
Copy link
Contributor

@sjdweb
Could you insert the following command into DockerfileForPlus after line 13?

RUN chmod 644 /etc/ssl/nginx/*

@sjdweb sjdweb closed this as completed Aug 10, 2017
@rajarajanpsj
Copy link

rajarajanpsj commented Sep 27, 2017

I had the same issue and for me the issue was NOT having the nginx-repo.key/nginx-repo.crt under /etc/ssl/nginx/ (one you download after creating an account in the nginx site). This cert is sent to https site as client side authentication, which authorizes the download!~

@pleshakov
Copy link
Contributor

@rajarajanpsj Did the RUN chmod 644 /etc/ssl/nginx/* command help to resolve the issue?

@rajarajanpsj
Copy link

In my case it was already 644. I did not have the key/crt there, that was the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants