Cristovao Cordeiro has proposed merging ~cjdc/ubuntu-docker-images/+git/nginx:1.24-23.10 into ~ubuntu-docker-images/ubuntu-docker-images/+git/nginx:1.24-23.10.
Commit message: feat: add rockfile for Chiselled NGINX ROCK Requested reviews: Ubuntu Docker Images (ubuntu-docker-images) For more details, see: https://code.launchpad.net/~cjdc/ubuntu-docker-images/+git/nginx/+merge/450652 -- Your team Ubuntu Docker Images is requested to review the proposed merge of ~cjdc/ubuntu-docker-images/+git/nginx:1.24-23.10 into ~ubuntu-docker-images/ubuntu-docker-images/+git/nginx:1.24-23.10.
diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bc1d673 --- /dev/null +++ b/LICENSE @@ -0,0 +1,23 @@ +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. diff --git a/README.upstream.md b/README.upstream.md new file mode 100644 index 0000000..7adf25f --- /dev/null +++ b/README.upstream.md @@ -0,0 +1,9 @@ +# About this Repo + +This is the Git repo of the official Docker image for [nginx](https://registry.hub.docker.com/_/nginx/). See the +Hub page for the full readme on how to use the Docker image and for information +regarding contributing and issues. + +The full readme is generated over in [docker-library/docs](https://github.com/docker-library/docs), +specifically in [docker-library/docs/nginx](https://github.com/docker-library/docs/tree/master/nginx). + diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..70cb022 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,55 @@ +# Running the examples + +## docker-compose + +Install `docker-compose` from the Ubuntu archive: + +``` +$ sudo apt install -y docker-compose +``` + +Call `docker-compose` from the examples directory: + +``` +$ docker-compose up -d +``` + +You can now access the nginx server by pointing your browser to +http://localhost:8080 . + +To stop `docker-compose`, run: + +``` +$ docker-compose down +``` + +# Microk8s + +Install microk8s from snap: + +``` +$ snap install microk8s --classic +``` + +With microk8s running, enable the `dns` and `storage` add-ons: + +``` +$ microk8s enable dns storage +``` + +Create a configmap for the configuration files: + +``` +$ microk8s kubectl create configmap nginx-config \ + --from-file=nginx=config/nginx.conf \ + --from-file=nginx-site=config/html/index.html +``` + +Apply the `microk8s-deployments.yml`: + +``` +$ microk8s kubectl apply -f microk8s-deployments.yml +``` + +You can now access the nginx server by pointing your browser to +http://localhost:31080 . diff --git a/examples/config/html/index.html b/examples/config/html/index.html new file mode 100644 index 0000000..3188b22 --- /dev/null +++ b/examples/config/html/index.html @@ -0,0 +1,6 @@ +<html> + <title>Ubuntu nginx OCI image -- It works!</title> + <body> + <p><h1>Ubuntu nginx OCI image -- It works!</h1></p> + </body> +</html> diff --git a/examples/config/nginx.conf b/examples/config/nginx.conf new file mode 100644 index 0000000..ac1e7e9 --- /dev/null +++ b/examples/config/nginx.conf @@ -0,0 +1,15 @@ +user www-data; +worker_processes auto; +pid /run/nginx.pid; + +events { } + +http { + server { + listen 80 default_server; + listen [::]:80 default_server; + root /srv/www; + index index.html; + server_name _; + } +} diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml new file mode 100644 index 0000000..2185273 --- /dev/null +++ b/examples/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + nginx: + image: ubuntu/nginx:edge + ports: + - 8080:80 + volumes: + - ./config/nginx.conf:/etc/nginx/nginx.conf:ro + - ./config/html:/srv/www:ro diff --git a/examples/nginx-deployment.yml b/examples/nginx-deployment.yml new file mode 100644 index 0000000..28a6b28 --- /dev/null +++ b/examples/nginx-deployment.yml @@ -0,0 +1,53 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: ubuntu/nginx:edge + volumeMounts: + - name: nginx-config-volume + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + - name: nginx-config-volume + mountPath: /srv/www/index.html + subPath: index.html + ports: + - containerPort: 80 + name: nginx + protocol: TCP + volumes: + - name: nginx-config-volume + configMap: + name: nginx-config + items: + - key: nginx + path: nginx.conf + - key: nginx-site + path: index.html +--- +apiVersion: v1 +kind: Service +metadata: + name: nginx-service +spec: + type: NodePort + selector: + app: nginx + ports: + - protocol: TCP + port: 80 + targetPort: 80 + nodePort: 31080 + name: nginx diff --git a/rockcraft.yaml b/rockcraft.yaml new file mode 100644 index 0000000..39c64e7 --- /dev/null +++ b/rockcraft.yaml @@ -0,0 +1,39 @@ +name: nginx +base: bare +build-base: ubuntu:22.04 +version: "1.24" +summary: A high-performance reverse proxy & web server, based on Ubuntu +description: | + Nginx ("engine X") is a high-performance web and reverse proxy server + created by Igor Sysoev. It can be used both as a standalone web server + and as a proxy to reduce the load on back-end HTTP or mail servers. +license: BSD-2-Clause +platforms: + amd64: + +services: + nginx: + override: replace + command: nginx -g 'daemon off;' + startup: enabled + on-failure: shutdown + +parts: + nginx: + plugin: nil + build-packages: + - git + build-environment: + - WWW_UID: 33 + - WWW_GID: 33 + override-build: | + git clone -b ubuntu-23.10-nginx --depth 1 \ + https://github.com/cjdcordeiro/chisel-releases + + install -d -m 0755 -o $WWW_UID -g $WWW_GID $CRAFT_PART_INSTALL/var/www + chisel cut --release $PWD/chisel-releases \ + --root $CRAFT_PART_INSTALL \ + base-files_var \ + base-passwd_data \ + nginx_bins \ + nginx-common_index
-- Mailing list: https://launchpad.net/~data-platform Post to : [email protected] Unsubscribe : https://launchpad.net/~data-platform More help : https://help.launchpad.net/ListHelp

