Coder Social home page Coder Social logo

nginx-with-docker / nginx-docker-playground Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 2.0 26 KB

Nginx Development Environment based on official docker image.

License: MIT License

Shell 100.00%
nginx docker nginx-docker nginx-docker-image nginx-module

nginx-docker-playground's Introduction

Nginx Docker Playground

Nginx Development Environment based on official docker image and official source code.

Quick Start

docker pull soulteary/prebuilt-nginx-modules:base-1.24.0
# or
docker pull soulteary/prebuilt-nginx-modules:base-1.23.1-alpine

Example, how to quickly build a nginx addon:

# @see https://github.com/nginx-with-docker/ngx_http_srcache_filter_module/blob/main/docker/0.32/Dockerfile.alpine

ARG NGINX_VERSION=1.19.7
FROM soulteary/prebuilt-nginx-modules:base-${NGINX_VERSION}-alpine AS Builder

ARG MODULE_CHECKSUM=127181f371046cc5ec0e0acf1b45cd478a8a7a5f
ARG MODULE_VERSION=0.32
ARG MODULE_NAME=srcache-nginx-module-src
ARG MODULE_SOURCE=https://github.com/nginx-with-docker/srcache-nginx-module-src

RUN cd /usr/src && \
    curl -L "${MODULE_SOURCE}/archive/refs/tags/v${MODULE_VERSION}.tar.gz" -o "${MODULE_VERSION}.tar.gz" && \
    echo "${MODULE_CHECKSUM}  ${MODULE_VERSION}.tar.gz" | shasum -c && \
    tar -zxC /usr/src -f ${MODULE_VERSION}.tar.gz && \
    cd /usr/src && \
    mv ${MODULE_NAME}-${MODULE_VERSION}/ ${MODULE_NAME} && \
    cd /usr/src/nginx && \
    CONFARGS=$(nginx -V 2>&1 | sed -n -e 's/^.*arguments: //p') \
    CONFARGS=${CONFARGS/-Os -fomit-frame-pointer -g/-Os} && \
    echo $CONFARGS && \
    ./configure --with-compat $CONFARGS --add-dynamic-module=../${MODULE_NAME}/ && \
    make modules

FROM scratch

COPY --from=Builder /usr/src/nginx/objs/ngx_http_srcache_filter_module.so /

Pre-built Nginx Addons

Pre-built nginx addons binaries based on this project

Support Nginx Versions

Below are other available nginx versions.

  • 1.24.0
  • 1.23.1
  • 1.23.0
  • 1.22.0
  • 1.21.6
  • 1.21.5
  • 1.21.4
  • 1.21.3
  • 1.21.1
  • 1.21.0
  • 1.20.0
  • 1.19.10
  • 1.19.9
  • 1.19.8
  • 1.19.7

nginx-docker-playground's People

Contributors

soulteary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

moujikov tabital0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.