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

add alpine variant #62

Closed
ncopa opened this issue Jan 25, 2016 · 10 comments
Closed

add alpine variant #62

ncopa opened this issue Jan 25, 2016 · 10 comments

Comments

@ncopa
Copy link

ncopa commented Jan 25, 2016

It would be nice with an nginx:alpine variant:

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
nginx               alpine              adfc4335a989        15 seconds ago      6.245 MB
nginx               latest              fb7fe53bd952        2 weeks ago         133.8 MB

The image above uses the distro provided nginx package:

FROM alpine:3.3

MAINTAINER NGINX Docker Maintainers "[email protected]"

ENV NGINX_VERSION 1.8.0

RUN apk add --no-cache nginx

# 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 443

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

I can probably help with either building an official nginx repository for alpine and use that as base for a docker image, or I can help you with building it from sources if you can point me to where I can find the compile options used for deb http://nginx.org/packages/mainline/debian/ jessie nginx

@thresheek
Copy link
Collaborator

What is the point of maintaining a build for a small obscure linux distro? I really do not understand.

The packaging sources are available on http://hg.nginx.org/pkg-oss/.

@ncopa
Copy link
Author

ncopa commented Jan 26, 2016

The point would be to provide a significantly smaller alternative for docker users. As you see the alpine docker image is 95% smaller (6.2MB vs 133.8MB). For users who roll out more than 20 nginx instances using docker this may mean:

  • 20 times more instances on same hardware
  • storage cost reduced with 95%
  • bandwidth cost for deployment reduced with 95%
  • reployment time reduced with 95%
  • better security due to attack surface reduced with 95%

But of course, all of this is completely pointless if you only deploy 1 instance or if you don't use docker in the first place.

Maintaining a nginx build against musl libc will also confirm that the code quality is high when it comes to portability - which it is. nginx has built on alpine linux without any issues since 2010.

Where can i find the compile options that you use for the maintained builds for the big non-obscure distros?

Thanks!

@thresheek
Copy link
Collaborator

Oh ok, that sounds great indeed.

I'm fine with introducing those builds provided that would not add much maintenance burden. If you could provide Dockerfiles and needed changes for that repo and docker-library, that would be awesome.

I've linked the compile options (as packaging sources) in the previous comment.

Thanks!

@md5
Copy link

md5 commented Jan 26, 2016

@ncopa Here is the ./configure call for the Debian package: http://hg.nginx.org/pkg-oss/file/tip/debian/rules#l21

@ncopa
Copy link
Author

ncopa commented Jan 26, 2016

Thanks!

@stephennancekivell
Copy link

+1 Thanks @ncopa, I love the idea.

@hbrls
Copy link

hbrls commented Feb 19, 2016

@thresheek What is the Docker Hub link? I did not find the new tags.

@thresheek
Copy link
Collaborator

@hbrls does not look like the PR is merged yet: docker-library/official-images#1462

I guess maintainers are quite busy with the libc6 CVE fallout, so cant blame really. Let's be patient. :-)

@hbrls
Copy link

hbrls commented Feb 19, 2016

@thresheek I thought this was the official repo. Now I know it's the child repo. 👏

@thresheek
Copy link
Collaborator

It is official by means that the actual development is going on here. docker-library/official-images is the way to propagate the tags to docker registry / hub.

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

5 participants