Sign inSign up

ewsdocker/alpine-nginx

By ewsdocker

Updated over 6 years ago

Bleeding-edge NGINX for Alpine Linux

Image
0

437

ewsdocker/alpine-nginx repository overview

ewsdocker/alpine-nginx:3.8.1

An un-modified NGINX HHTP Web server image in an Alpine Linux container.


Visit the ewsdocker/alpine-nginx Wiki for complete documentation.


The ewsdocker/alpine-nginx docker image is based on the latest NGINX mainline version (edge) in an Alpine Linux edge docker image.


The ewsdocker/alpine-nginx docker image is NOT an official release of NGINX.


Visit the ewsdocker/alpine-nginx Wiki for complete documentation.


Installing ewsdocker/alpine-nginx

Below are presented two examples of the many ways to download, create and start the service container. Both examples have strengths and weaknesses.

  1. Docker Volume
    This is the easiest procedure to understand. It uses the volume option to map the NGINX html folder in the alpine-nginx container to a Docker host folder (in the calling user's home folder) to be used for the NGINX html folder.
  2. Docker Mount
    This procedure uses the mount option of the docker run command to map a Docker Volume on the Docker Host to the alpine-nginx NGINX html folder. It requires creation of a Docker Volume, which adds to the complexity. However, the benefit is that it is a Docker volume and not a user's folder;

In both approaches, the image will be

  • pulled from Docker Hub (if it is not already present),
  • built into a web service container (if it is not already created), and
  • started on port 80.

Docker Volume.

In this example, the .local/shared/nginx-html folder (in the calling user's home directory) will contain the html documents to serve. HTML data (Web Pages) to be served should be added to the nginx-html folder.

Execute the following docker run command to download the image, create a service container and start the service on port 80:

docker run -d \
           --restart unless-stopped \
           -v ${HOME}/.local/shared/nginx-html:/usr/share/nginx/html \
           -p 80:80 \
           --name=alpine-nginx-3.8.1 \
       ewsdocker/alpine-nginx:3.8.1  

Docker Mount.

This procedure uses the mount option to mount a Docker volume to be used for the NGINX html folder.

  • Check for existence of the nginx-html volume:

    docker volume inspect nginx-html

  • If the response is Error: No such volume: nginx-html, create the volume:

    docker volume create nginx-html

HTML data (Web Pages) to be served should be added to the nginx-html volume, starting in the /, or root, directory.

Execute the following docker run command to download the image, create a service container and start the service on port 80:

docker run -d \
           --restart unless-stopped \
           --mount source=nginx-html,target=/usr/share/nginx/html \
           -p 80:80 \
           --name=alpine-nginx-3.8.1 \
       ewsdocker/alpine-nginx:3.8.1  

Visit the ewsdocker/alpine-nginx Wiki for complete documentation.


ewsdocker/alpine-nginx
Copyright © 2018. EarthWalk Software.
Licensed under the GNU General Public License, GPL-3.0-or-later.

This file is part of ewsdocker/alpine-nginx.

ewsdocker/alpine-nginx is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

ewsdocker/alpine-nginx is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with ewsdocker/alpine-nginx. If not, see http://www.gnu.org/licenses/.


NGINX
Copyright (C) 2011-2016 Nginx, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Tag summary

Content type

Image

Digest

Size

26 MB

Last updated

over 6 years ago

docker pull ewsdocker/alpine-nginx:3.10.0