mirror of
https://github.com/NginxProxyManager/docker-nginx-full.git
synced 2024-12-06 19:26:20 +01:00
Initial commit of files
This commit is contained in:
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
BLUE='\E[1;34m'
|
||||
CYAN='\E[1;36m'
|
||||
YELLOW='\E[1;33m'
|
||||
GREEN='\E[1;32m'
|
||||
RESET='\E[0m'
|
||||
|
||||
echo -e "${BLUE}❯ ${CYAN}Building Lua ${YELLOW}${LUA_VERSION}...${RESET}"
|
||||
|
||||
cd /tmp
|
||||
wget "http://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz"
|
||||
tar -xzf lua-${LUA_VERSION}.tar.gz
|
||||
mv /tmp/lua-${LUA_VERSION} /tmp/lua
|
||||
cd /tmp/lua
|
||||
|
||||
make linux test
|
||||
# We have to install Lua for the Luarocks build to succeed, it will be installed again when building the final image
|
||||
make install
|
||||
|
||||
echo -e "${BLUE}❯ ${GREEN}Lua build completed${RESET}"
|
||||
|
||||
echo -e "${BLUE}❯ ${CYAN}Building Luarocks ${YELLOW}${LUAROCKS_VERSION}...${RESET}"
|
||||
|
||||
cd /tmp
|
||||
wget "http://luarocks.github.io/luarocks/releases/luarocks-${LUAROCKS_VERSION}.tar.gz"
|
||||
tar -xzf luarocks-${LUAROCKS_VERSION}.tar.gz
|
||||
mv /tmp/luarocks-${LUAROCKS_VERSION} /tmp/luarocks
|
||||
cd /tmp/luarocks
|
||||
|
||||
./configure
|
||||
make
|
||||
|
||||
echo -e "${BLUE}❯ ${GREEN}Luarocks build completed${RESET}"
|
||||
Executable
+59
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
BLUE='\E[1;34m'
|
||||
CYAN='\E[1;36m'
|
||||
YELLOW='\E[1;33m'
|
||||
GREEN='\E[1;32m'
|
||||
RESET='\E[0m'
|
||||
|
||||
echo -e "${BLUE}❯ ${CYAN}Building OpenResty ${YELLOW}${OPENRESTY_VERSION}...${RESET}"
|
||||
|
||||
cd /tmp
|
||||
wget "https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz"
|
||||
tar -xzf openresty-${OPENRESTY_VERSION}.tar.gz
|
||||
mv /tmp/openresty-${OPENRESTY_VERSION} /tmp/openresty
|
||||
cd /tmp/openresty
|
||||
|
||||
./configure \
|
||||
--prefix=/etc/nginx \
|
||||
--sbin-path=/usr/sbin/nginx \
|
||||
--modules-path=/usr/lib/nginx/modules \
|
||||
--conf-path=/etc/nginx/nginx.conf \
|
||||
--error-log-path=/var/log/nginx/error.log \
|
||||
--http-log-path=/var/log/nginx/access.log \
|
||||
--pid-path=/var/run/nginx.pid \
|
||||
--lock-path=/var/run/nginx.lock \
|
||||
--http-client-body-temp-path=/var/cache/nginx/client_temp \
|
||||
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
|
||||
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
|
||||
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
|
||||
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
|
||||
--user=nginx \
|
||||
--group=nginx \
|
||||
--with-compat \
|
||||
--with-threads \
|
||||
--with-http_addition_module \
|
||||
--with-http_auth_request_module \
|
||||
--with-http_dav_module \
|
||||
--with-http_flv_module \
|
||||
--with-http_gunzip_module \
|
||||
--with-http_gzip_static_module \
|
||||
--with-http_mp4_module \
|
||||
--with-http_random_index_module \
|
||||
--with-http_realip_module \
|
||||
--with-http_secure_link_module \
|
||||
--with-http_slice_module \
|
||||
--with-http_ssl_module \
|
||||
--with-http_stub_status_module \
|
||||
--with-http_sub_module \
|
||||
--with-http_v2_module \
|
||||
--with-mail \
|
||||
--with-mail_ssl_module \
|
||||
--with-stream \
|
||||
--with-stream_realip_module \
|
||||
--with-stream_ssl_module \
|
||||
--with-stream_ssl_preread_module
|
||||
|
||||
make -j2
|
||||
|
||||
echo -e "${BLUE}❯ ${GREEN}OpenResty build completed${RESET}"
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
BLUE='\E[1;34m'
|
||||
CYAN='\E[1;36m'
|
||||
YELLOW='\E[1;33m'
|
||||
GREEN='\E[1;32m'
|
||||
RESET='\E[0m'
|
||||
|
||||
echo -e "${BLUE}❯ ${CYAN}Building docker multiarch: ${YELLOW}${*}${RESET}"
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "${DIR}/.."
|
||||
|
||||
# Buildx Builder
|
||||
docker buildx create --name "${BUILDX_NAME:-nginx-full}" || echo
|
||||
docker buildx use "${BUILDX_NAME:-nginx-full}"
|
||||
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64,linux/arm/7 \
|
||||
--progress plain \
|
||||
--pull \
|
||||
--build-arg BASE_TAG \
|
||||
--build-arg OPENRESTY_VERSION \
|
||||
--build-arg LUA_VERSION \
|
||||
--build-arg LUAROCKS_VERSION \
|
||||
$@ \
|
||||
.
|
||||
|
||||
docker buildx rm "${BUILDX_NAME:-nginx-full}"
|
||||
|
||||
echo -e "${BLUE}❯ ${GREEN}Multiarch build Complete${RESET}"
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
BLUE='\E[1;34m'
|
||||
CYAN='\E[1;36m'
|
||||
YELLOW='\E[1;33m'
|
||||
GREEN='\E[1;32m'
|
||||
RESET='\E[0m'
|
||||
|
||||
echo -e "${BLUE}❯ ${CYAN}Installing Lua ${YELLOW}${LUA_VERSION}...${RESET}"
|
||||
|
||||
cd /tmp/lua
|
||||
make install
|
||||
rm -rf /tmp/lua
|
||||
|
||||
echo -e "${BLUE}❯ ${GREEN}Lua install completed${RESET}"
|
||||
|
||||
echo -e "${BLUE}❯ ${CYAN}Installing Luarocks ${YELLOW}${LUAROCKS_VERSION}...${RESET}"
|
||||
|
||||
cd /tmp/luarocks
|
||||
make install
|
||||
rm -rf /tmp/luarocks
|
||||
|
||||
echo -e "${BLUE}❯ ${GREEN}Luarocks install completed${RESET}"
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
BLUE='\E[1;34m'
|
||||
CYAN='\E[1;36m'
|
||||
YELLOW='\E[1;33m'
|
||||
GREEN='\E[1;32m'
|
||||
RESET='\E[0m'
|
||||
|
||||
echo -e "${BLUE}❯ ${CYAN}Installing OpenResty ${YELLOW}${OPENRESTY_VERSION}...${RESET}"
|
||||
|
||||
cd /tmp/openresty
|
||||
make install
|
||||
rm -rf /tmp/openresty
|
||||
|
||||
echo -e "${BLUE}❯ ${GREEN}OpenResty install completed${RESET}"
|
||||
|
||||
echo -e "${BLUE}❯ ${CYAN}Installing OpenResty plugins...${RESET}"
|
||||
|
||||
cd /
|
||||
luarocks install lua-cjson
|
||||
luarocks install lua-resty-openidc
|
||||
|
||||
echo -e "${BLUE}❯ ${GREEN}OpenResty plugins install completed${RESET}"
|
||||
Reference in New Issue
Block a user