Skip to content

Commit

Permalink
Merge branch 'main' into chore/k8s-support
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Nov 16, 2022
2 parents d082277 + 1ded7a9 commit 7747580
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

lint:
name: Lint
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -38,3 +38,13 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
only-new-issues: true

actionlint:
name: Actionlint
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: reviewdog/action-actionlint@v1
with:
fail_on_error: true
11 changes: 5 additions & 6 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ FROM nginx:1.23.2 AS debian
RUN --mount=type=bind,from=opentracing-lib,target=/tmp/ot/ \
apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y libcap2-bin \
# temp fix for CVE-2022-40674
&& apt-get install -y libexpat1 \
&& rm -rf /var/lib/apt/lists/* \
&& cp -av /tmp/ot/usr/local/lib/libopentracing.so* /tmp/ot/usr/local/lib/libjaegertracing*so* /tmp/ot/usr/local/lib/libzipkin*so* /tmp/ot/usr/local/lib/libdd*so* /tmp/ot/usr/local/lib/libyaml*so* /usr/local/lib/ \
&& cp -av /tmp/ot/usr/lib/nginx/modules/ngx_http_opentracing_module.so /usr/lib/nginx/modules/ \
Expand All @@ -29,8 +27,6 @@ FROM nginx:1.23.2-alpine AS alpine

RUN --mount=type=bind,from=alpine-opentracing-lib,target=/tmp/ot/ \
apk add --no-cache libcap libstdc++ \
# temp fix for CVE-2022-3209 and CVE-2022-35252
&& apk upgrade --no-cache libxml2 curl libcurl \
&& cp -av /tmp/ot/usr/local/lib/libopentracing.so* /tmp/ot/usr/local/lib/libjaegertracing*so* /tmp/ot/usr/local/lib/libzipkin*so* /tmp/ot/usr/local/lib/libdd*so* /tmp/ot/usr/local/lib/libyaml*so* /usr/local/lib/ \
&& cp -av /tmp/ot/usr/lib/nginx/modules/ngx_http_opentracing_module.so /usr/lib/nginx/modules/ \
&& ldconfig /usr/local/lib/
Expand Down Expand Up @@ -90,8 +86,6 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
&& printf "%s\n" "deb https://pkgs.nginx.com/app-protect/${NGINX_PLUS_VERSION}/debian ${DEBIAN_VERSION} nginx-plus" \
"deb https://pkgs.nginx.com/app-protect-security-updates/debian ${DEBIAN_VERSION} nginx-plus" > /etc/apt/sources.list.d/nginx-app-protect.list \
&& apt-get update \
# temp fix for CVE-2022-37434 and DLA-3112-1
&& apt-get install zlib1g libbz2-1.0 \
&& apt-get install --no-install-recommends --no-install-suggests -y app-protect app-protect-attack-signatures app-protect-threat-campaigns \
&& apt-get purge --auto-remove -y curl; \
fi \
Expand Down Expand Up @@ -125,6 +119,9 @@ LABEL name="NGINX Ingress Controller" \

COPY --link --chown=101:0 LICENSE /licenses/

# temp fix for CVE-2022-27404, CVE-2022-33099 and CVE-2022-37434
RUN microdnf --nodocs upgrade -y freetype lua-libs zlib


############################################# Base image for UBI with NGINX Plus #############################################
FROM redhat/ubi8 AS ubi-plus
Expand All @@ -134,6 +131,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 \
--mount=type=secret,id=nginx-repo.key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \
dnf --nodocs install -y shadow-utils ca-certificates \
# temp fix for CVE-2022-1304 and CVE-2016-3709
&& dnf --nodocs install -y libcom_err libxml2 \
&& groupadd --system --gid 101 nginx \
&& useradd --system --gid nginx --no-create-home --home-dir /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx \
&& rpm --import https://cs.nginx.com/static/keys/nginx_signing.key \
Expand Down

0 comments on commit 7747580

Please sign in to comment.