Update nginx image
This commit is contained in:
parent
eb3fd57bd2
commit
fbdd924a45
5 changed files with 10 additions and 16 deletions
4
Makefile
4
Makefile
|
@ -50,7 +50,7 @@ GOBUILD_FLAGS := -v
|
||||||
|
|
||||||
ALL_ARCH = amd64 arm arm64
|
ALL_ARCH = amd64 arm arm64
|
||||||
|
|
||||||
QEMUVERSION = v4.1.0-1
|
QEMUVERSION = v4.1.1-1
|
||||||
|
|
||||||
BUSTED_ARGS =-v --pattern=_test
|
BUSTED_ARGS =-v --pattern=_test
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ export E2E_CHECK_LEAKS
|
||||||
export SLOW_E2E_THRESHOLD
|
export SLOW_E2E_THRESHOLD
|
||||||
|
|
||||||
# Set default base image dynamically for each arch
|
# Set default base image dynamically for each arch
|
||||||
BASEIMAGE?=quay.io/kubernetes-ingress-controller/nginx-$(ARCH):daf8634acf839708722cffc67a62e9316a2771c6
|
BASEIMAGE?=quay.io/kubernetes-ingress-controller/nginx-$(ARCH):23612cfde79b6ae7af4d30c3a7aaac0dcb5e6a27
|
||||||
|
|
||||||
ifeq ($(ARCH),arm)
|
ifeq ($(ARCH),arm)
|
||||||
QEMUARCH=arm
|
QEMUARCH=arm
|
||||||
|
|
|
@ -73,7 +73,7 @@ func rlimitMaxNumFiles() int {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defBinary = "/usr/local/openresty/nginx/sbin/nginx"
|
defBinary = "/usr/local/nginx/sbin/nginx"
|
||||||
cfgPath = "/etc/nginx/nginx.conf"
|
cfgPath = "/etc/nginx/nginx.conf"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -31,10 +31,6 @@ RUN clean-install \
|
||||||
|
|
||||||
COPY --chown=www-data:www-data . /
|
COPY --chown=www-data:www-data . /
|
||||||
|
|
||||||
RUN cp /usr/local/openresty/nginx/conf/mime.types /etc/nginx/mime.types \
|
|
||||||
&& cp /usr/local/openresty/nginx/conf/fastcgi_params /etc/nginx/fastcgi_params
|
|
||||||
RUN ln -s /usr/local/openresty/nginx/modules /etc/nginx/modules
|
|
||||||
|
|
||||||
# Fix permission during the build to avoid issues at runtime
|
# Fix permission during the build to avoid issues at runtime
|
||||||
# with volumes (custom templates)
|
# with volumes (custom templates)
|
||||||
RUN bash -eu -c ' \
|
RUN bash -eu -c ' \
|
||||||
|
@ -53,15 +49,14 @@ RUN bash -eu -c ' \
|
||||||
RUN setcap cap_net_bind_service=+ep /nginx-ingress-controller \
|
RUN setcap cap_net_bind_service=+ep /nginx-ingress-controller \
|
||||||
&& setcap -v cap_net_bind_service=+ep /nginx-ingress-controller
|
&& setcap -v cap_net_bind_service=+ep /nginx-ingress-controller
|
||||||
|
|
||||||
RUN setcap cap_net_bind_service=+ep /usr/local/openresty/nginx/sbin/nginx \
|
RUN setcap cap_net_bind_service=+ep /usr/local/nginx/sbin/nginx \
|
||||||
&& setcap -v cap_net_bind_service=+ep /usr/local/openresty/nginx/sbin/nginx
|
&& setcap -v cap_net_bind_service=+ep /usr/local/nginx/sbin/nginx
|
||||||
|
|
||||||
USER www-data
|
USER www-data
|
||||||
|
|
||||||
# Create symlinks to redirect nginx logs to stdout and stderr docker log collector
|
# Create symlinks to redirect nginx logs to stdout and stderr docker log collector
|
||||||
RUN ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \
|
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
|
||||||
&& ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log \
|
&& ln -sf /dev/stderr /var/log/nginx/error.log
|
||||||
&& ln -s /usr/local/openresty/nginx/logs/* /var/log/nginx
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
|
|
|
@ -600,8 +600,7 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
stream {
|
stream {
|
||||||
lua_package_cpath "/usr/local/lib/lua/?.so;/usr/lib/lua-platform-path/lua/5.1/?.so;;";
|
lua_package_path "/etc/nginx/lua/?.lua;/etc/nginx/lua/vendor/?.lua;;";
|
||||||
lua_package_path "/etc/nginx/lua/?.lua;/etc/nginx/lua/vendor/?.lua;/usr/local/lib/lua/?.lua;;";
|
|
||||||
|
|
||||||
lua_shared_dict tcp_udp_configuration_data 5M;
|
lua_shared_dict tcp_udp_configuration_data 5M;
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Redirect", func() {
|
||||||
Expect(errs).To(BeNil())
|
Expect(errs).To(BeNil())
|
||||||
Expect(resp.StatusCode).Should(BeNumerically("==", http.StatusMovedPermanently))
|
Expect(resp.StatusCode).Should(BeNumerically("==", http.StatusMovedPermanently))
|
||||||
Expect(resp.Header.Get("Location")).Should(Equal(redirectURL))
|
Expect(resp.Header.Get("Location")).Should(Equal(redirectURL))
|
||||||
Expect(body).Should(ContainSubstring("openresty/"))
|
Expect(body).Should(ContainSubstring("nginx/"))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("should respond with a custom redirect code", func() {
|
It("should respond with a custom redirect code", func() {
|
||||||
|
@ -108,6 +108,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Redirect", func() {
|
||||||
Expect(errs).To(BeNil())
|
Expect(errs).To(BeNil())
|
||||||
Expect(resp.StatusCode).Should(BeNumerically("==", redirectCode))
|
Expect(resp.StatusCode).Should(BeNumerically("==", redirectCode))
|
||||||
Expect(resp.Header.Get("Location")).Should(Equal(redirectURL))
|
Expect(resp.Header.Get("Location")).Should(Equal(redirectURL))
|
||||||
Expect(body).Should(ContainSubstring("openresty/"))
|
Expect(body).Should(ContainSubstring("nginx/"))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue