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

Docker installer: pgp key can't be retrieved #20022

Closed
nebelpfade opened this issue Feb 5, 2016 · 51 comments
Closed

Docker installer: pgp key can't be retrieved #20022

nebelpfade opened this issue Feb 5, 2016 · 51 comments

Comments

@nebelpfade
Copy link

nebelpfade commented Feb 5, 2016

Hello,

We are using docker for our agnostic platform, here we have been installing docker to customers' servers about 10 times every day.
The problem that about 10-20% of installation fails with error:

Setting up apt-transport-https (1.0.9.8.2) ...
+ sh -c apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.LXKiwbEf78 --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net
gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

can it be fixed?

@nebelpfade nebelpfade changed the title Docker installer can't be retrieved Docker installer: pgp key can't be retrieved Feb 5, 2016
@jimfcarroll
Copy link

This breaks everyone's automatic updates on ubuntu creating a major security problem. I had to disable the docker repo in sources to get the updates to complete.

@thaJeztah
Copy link
Member

unfortunately, the sks-keyservers.net pool is not under our control, so I'm not sure we can do anything to improve that. It's weird thought, because unlike other reports, it doesn't tell the server is unreachable (e.g. #13555)?

@programmerq
Copy link
Contributor

I've heard a few more reports for sks-keyservers.net having an outage today. I'm not sure what else could be done either, but it does suck that the docker install method breaks due to a third party service.

@nebelpfade
Copy link
Author

One more:

  • sh -c apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.URVDDTaRSF --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net
    ?: p80.pool.sks-keyservers.net: Host not found
    gpgkeys: HTTP fetch error 7: couldn't connect: Success
    gpg: no valid OpenPGP data found.
    gpg: Total number processed: 0

@fkautz
Copy link
Contributor

fkautz commented Feb 10, 2016

@thaJeztah Would you accept a patch that tries another key server besides sks-keyservers if it fails? e.g. we can fail over to keyserver.ubuntu.com.

@fkautz
Copy link
Contributor

fkautz commented Feb 10, 2016

pgp.mit.edu is another choice we can fallback to

@thaJeztah
Copy link
Member

If there's a clean approach to poll multiple servers, I'm "+1" personally

@fkautz
Copy link
Contributor

fkautz commented Feb 10, 2016

@thaJeztah Check out #20184

@fkautz
Copy link
Contributor

fkautz commented Feb 10, 2016

@nebelpfade if this is accepted and the install still fails, let me know. I'll add in yet another backup server.

@fkautz
Copy link
Contributor

fkautz commented Feb 11, 2016

@thaJeztah since this is affecting people in production now, is there any way to backport #20184?

@programmerq
Copy link
Contributor

@fkautz you might be able to use the direct link to the new file. Instead of curl https://get.docker.com/ | bash, try curl https://raw.githubusercontent.com/docker/docker/master/hack/install.sh | bash

@fkautz
Copy link
Contributor

fkautz commented Feb 11, 2016

@programmerq sure, that's easy for me to do manually, but doesn't help production scripts. sks-keyservers have been really flaky recently, hence the patch. E.g. @nebelpfade mentioned he is seeing this failure at 10-20% of his installations. Considering I ran into the same problem in other docker install scripts and had to script a workaround to replace the keyserver, I suspect others are experiencing this issue with higher frequency than is being reported.

@thaJeztah
Copy link
Member

@fkautz just discussed it, and we're considering updating the script with your changes, but will do so manually, after the 1.10.1 release to not interfere with the release.

Thanks again btw for opening that PR ❤️ feel free to ping me if the script hasn't been updated in a few days

@fkautz
Copy link
Contributor

fkautz commented Feb 11, 2016

Great, thanks for the update!

@nebelpfade
Copy link
Author

nebelpfade commented Feb 19, 2016

==> default: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.AJ7lzsjRd9 --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
==> default: gpg: requesting key 2C52609D from hkp server pool.sks-keyservers.net
==> default: gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D not found on keyserver
==> default: gpg: no valid OpenPGP data found.
==> default: gpg: Total number processed: 0
==> default: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.gRBg5tnGwg --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
==> default: gpg: requesting key 2C52609D from hkp server pgp.mit.edu
==> default: gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D can't be retrieved
==> default: gpg: no valid OpenPGP data found.
==> default: gpg: Total number processed: 0

seems still some problems, but it was first failure since you release the fix

@thaJeztah
Copy link
Member

@nebelpfade yeah, the change was applied to the script indeed, so not sure what more we can do 😢. Are you okay with closing this issue?

@fkautz
Copy link
Contributor

fkautz commented Feb 20, 2016

@nebelpfade My guess, based on my previous experience with this issue, is your dns server might not be serving up the ip address properly. If you attempt to ping the key servers when this fails, I think you will find the domain will not resolve.

We could try adding a third keyserver, but I don't think this will solve the root of the problem in your case. :(

@nebelpfade
Copy link
Author

hm... our DNS servers are: 8.8.8.8 and 8.8.4.4
Also before key function there at least: wget -qO- https://get.docker.com and works well as you can see (scripts executed and fails).
Also I cannot get it: gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D not found on keyserver
It means that key server answered and here no any issues with DNS or internet connections

What do you think?

@nebelpfade
Copy link
Author

Hello,

it seems this fix was removed from get.docker.com: https://get.docker.com/
And:

  • sh -c apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.5tvTTHbws0 --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net\ngpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D can't be retrieved
    gpg: no valid OpenPGP data found.\ngpg: Total number processed: 0

twice for today already

@thaJeztah
Copy link
Member

@nebelpfade oh, that's strange. Possibly it got reverted during the 1.10.2 update, because it was updated manually after the previous release

ping @tiborvass ^^

@nebelpfade
Copy link
Author

any updates here? installer without fallback fails a lot more that with fallback

@tiborvass
Copy link
Contributor

Will manually update it today. Sorry about this

@thaJeztah
Copy link
Member

I see there was just a new implementation merged for this; perhaps we can use that one #20022

@vperron
Copy link

vperron commented Mar 17, 2016

@tiborvass also blocking to me, has anything been done yet ? Thanks !

@nebelpfade
Copy link
Author

Here is no fallback still (again?):
https://get.docker.com/

a lot of fails last weekends with:
/etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net
gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D can't be retrieved
gpg: no valid OpenPGP data found.

@thaJeztah
Copy link
Member

@tiborvass I see the updated version is present in the 1.11 bump branch, but not updated on test.docker.com, any idea why?

@bmarkovic
Copy link

bmarkovic commented Apr 19, 2016

This is still not working. In fact, if you manually search the key database on p80.pool.sks-keyservers.net via their web interface, and search for the key 58118E89F3A912897C070ADBF76221572C52609D -- you'll find none.

It appears it's not a configuration issue, but your key is simply missing from their database.

@thaJeztah
Copy link
Member

@bmarkovic not sure how to find it through their web-interface, but these all seem to work for me;

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.EBy7mJktiQ --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.UumiuoMVY2 --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server ha.pool.sks-keyservers.net
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
apt-key adv --keyserver pgp.mit.edu --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.b1Tyb4gL2C --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver pgp.mit.edu --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server pgp.mit.edu
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.s1tDndNDga --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server keyserver.ubuntu.com
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

@menezee
Copy link

menezee commented Apr 27, 2016

using:

sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

I've received:

gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

using:

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

I've received:

gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

don't know why, but it works

@fkautz
Copy link
Contributor

fkautz commented May 7, 2016

Someone needs to report this upstream to see if there is any way to resolve this.

The problem isn't with docker's setup script, although the setup script attempts to work around the problem by trying multiple servers. This appears to be some form of intermittent error which may be caused by any number of factors such as DNS misconfiguration, corporate firewall policies, or other environmental issues.

@moredatapls
Copy link

moredatapls commented May 23, 2016

Had the same issue, and I'm sitting behind my company's proxy. Solved it by manually passing the proxy to apt-key:

sudo apt-key adv --keyserver-options http-proxy="http://proxy.company.com:8080/" --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

I successfully set the proxy for apt-get by creating the /etc/apt/apt.conf.d/95proxies file, but apparently, apt-key does not use this setting: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1433761.

EDIT: Some users are suggesting to use --keyserver-options http-proxy=$http_proxy if the proxy is set as an environment variable, which seems to work fine for me as well.

@thaJeztah
Copy link
Member

@tianon do you think it would make sense to add that to the install script (i.e. if http_proxy is set, add that option?)

@fkautz
Copy link
Contributor

fkautz commented May 23, 2016

@thaJeztah I think it would make sense. Failover should continue to exist, since most users will not be running their own keyserver, but makes sense to include it.

@thaJeztah
Copy link
Member

Someone good at bash, and willing to open a pull request? 😇

@rishibamba
Copy link

@hbrgnr : --keyserver-options http-proxy=$http_proxy

This worked for me thanks :)

@Shuliyey
Copy link

@rishibamba 👍 thanks 😄

The below command should work, this ticket should be closed

sudo apt-key adv --keyserver-options http-proxy='http://<domain>%5C<user>:<password>@<proxy_ip_or_name>:<port>/' --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

In my case it's below

sudo apt-key adv --keyserver-options http-proxy='http://dev%5Cinfinityadmin:cannottell@meldevproxy.dev.tech.local:8080/' --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

@raupachz
Copy link

Failing again. Having the same problem as @bmarkovic Can't event find the key using their webinterface. We are not behind a proxy.

@jgleal
Copy link

jgleal commented Aug 19, 2016

@bmarkovic
Copy link

Perhaps there is some form of network split with sks-keyservers.net. Assuming they work as a sort of CDN (hence the 'pool' in the URI) perhaps some nodes have the key, and others don't. Your ability to retrieve it would then depend on where you are geographically and/or who's your ISP.

@joshrivers
Copy link

@jgleal It looks like you need to go through another path to get the key in the browser:
http://p80.pool.sks-keyservers.net:11371/pks/lookup?search=0x58118E89F3A912897C070ADBF76221572C52609D&op=vindex

@tonistiigi
Copy link
Member

I think this can be closed as the confusion about the web interface seems to be resolved and fallback servers are in place in the install script.

@mautematico
Copy link

I think https://docs.docker.com/engine/installation/linux/debian/ is still wrong.

@bozoh
Copy link

bozoh commented Sep 20, 2016

you can use other keyserver, i used hkp://keyserver.ubuntu.com:80, and works

@AndreFelipeMachado
Copy link

Hello,
I tried many of the suggestions for installing on Debian Jessie.
The doc https://docs.docker.com/engine/installation/linux/debian/ is still wrong
The one that worked:
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Regards

@tonistiigi
Copy link
Member

@AndreFelipeMachado I'm not sure I understand as the docs you link to have the same command that you confirm as working for you.

So the problem is that different servers are more stable at different times and for different users. We have retries in the install script but only the best server in the docs. Should we use ha.pool.sks-keyservers.net:80 instead or is ubuntu server more stable?

cc @thaJeztah

@ahmed149
Copy link

ahmed149 commented Oct 4, 2016

Hello
root@ubuntu-16:~# sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: /tmp/tmp.jrvf0eLydQ/gpg.1.sh --keyserver
hkp://p80.pool.sks-keyservers.net:80
--recv-keys
58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net
gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: keyserver helper general error
gpg: keyserver communications error: unknown pubkey algorithm
gpg: keyserver receive failed: unknown pubkey algorithm
I need help please

@sah4ez
Copy link

sah4ez commented Oct 12, 2016

@ahmed149 if you have a proxy, se the answer @Shuliyey commented on 19 Jul

@arcanosam
Copy link

Having the same problem.

I could make it work giving 'sudo bash'
and use the same command in docs without 'sudo' like @AndreFelipeMachado

@srthorat
Copy link

Following worked for me,

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

@clsacramento
Copy link

Hi,
I had the issue today because of proxy, although I have proxy setup in apt.conf and on my environment, apt-key would not work because it does not get it from apt.conf and as in docker documentation it runs as sudo it does not have the environment either... This was a bit misleading, it looked like the key server was down because of the error reported by apt-key but it was actually proxy issue.
I was following this documentation: https://docs.docker.com/engine/installation/linux/ubuntulinux/
The command given did not work because I had to add '-E' after sudo (or add the proxy in apt-key command) not because the server was down.
The docker doc does not mention proxy so maybe just a reminder could help...
Cheers,

@lmorales171290
Copy link

lmorales171290 commented May 30, 2018

Hello, this code worked for me..

FROM debian:stretch-slim

MAINTAINER NGINX Docker Maintainers "docker-maint@nginx.com"

ENV NGINX_VERSION 1.12.1-1~stretch
ENV NJS_VERSION   1.12.1.0.1.10-1~stretch

RUN apt-get update \
	&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 \
	&& \
	NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
	found=''; \
	for server in \
		ha.pool.sks-keyservers.net \
		hkp://keyserver.ubuntu.com:80 \
		hkp://p80.pool.sks-keyservers.net:80 \
		pgp.mit.edu \
	; do \
		echo "Fetching GPG key $NGINX_GPGKEY from $server"; \
		apt-key adv --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$NGINX_GPGKEY" && found=yes && break; \
	done; \
	test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
	apt-get remove --purge -y gnupg1 && apt-get -y --purge autoremove && rm -rf /var/lib/apt/lists/* \
	&& echo "deb http://nginx.org/packages/debian/ stretch nginx" >> /etc/apt/sources.list \
	&& apt-get update \
	&& apt-get install --no-install-recommends --no-install-suggests -y \
						nginx=${NGINX_VERSION} \
						nginx-module-xslt=${NGINX_VERSION} \
						nginx-module-geoip=${NGINX_VERSION} \
						nginx-module-image-filter=${NGINX_VERSION} \
						nginx-module-njs=${NJS_VERSION} \
						gettext-base \
	&& rm -rf /var/lib/apt/lists/*

# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
	&& ln -sf /dev/stderr /var/log/nginx/error.log

EXPOSE 80

STOPSIGNAL SIGTERM

CMD ["nginx", "-g", "daemon off;"]

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