Skip to content

Commit a629204

Browse files
authored
Merge branch 'jlesage:master' into crowdsec_rework
2 parents f56abc7 + db74ad0 commit a629204

File tree

7 files changed

+189
-165
lines changed

7 files changed

+189
-165
lines changed

.github/workflows/build-image.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
jobs:
2020
build:
2121
name: Build image
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-22.04
2323

2424
steps:
2525
- name: Free disk space
@@ -62,6 +62,7 @@ jobs:
6262
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
6363
TAGS="$TAGS,${{ env.DOCKER_IMAGE_NAME }}:latest"
6464
fi
65+
TAGS="$TAGS,$(echo $TAGS | tr ',' '\n' | sed 's|^|ghcr.io/|' | tr '\n' ',')"
6566
# Determine the release type.
6667
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
6768
IS_RELEASE=yes
@@ -106,6 +107,14 @@ jobs:
106107
username: ${{ secrets.DOCKERHUB_USERNAME }}
107108
password: ${{ secrets.DOCKERHUB_PASSWORD }}
108109

110+
- name: Login to GitHub Container Registry
111+
if: ${{ steps.prep.outputs.is_release == 'yes' }}
112+
uses: docker/login-action@v3
113+
with:
114+
registry: ghcr.io
115+
username: ${{ github.repository_owner }}
116+
password: ${{ secrets.GITHUB_TOKEN }}
117+
109118
- name: Build and push
110119
uses: docker/build-push-action@v6
111120
with:
@@ -139,7 +148,7 @@ jobs:
139148
notification:
140149
name: Notification
141150
needs: [ build ]
142-
runs-on: ubuntu-20.04
151+
runs-on: ubuntu-22.04
143152
if: ${{ always() && github.event_name != 'pull_request' }}
144153

145154
steps:

DOCKERHUB.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Nginx or Letsencrypt.
2424
## Quick Start
2525

2626
**NOTE**:
27-
The Docker command provided in this quick start is given as an example
28-
and parameters should be adjusted to your need.
27+
The Docker command provided in this quick start is an example, and parameters
28+
should be adjusted to suit your needs.
2929

3030
Launch the Nginx Proxy Manager docker container with the following command:
3131
```shell
@@ -40,19 +40,17 @@ docker run -d \
4040

4141
Where:
4242

43-
- `/docker/appdata/nginx-proxy-manager`: This is where the application stores its configuration, states, log and any files needing persistency.
43+
- `/docker/appdata/nginx-proxy-manager`: Stores the application's configuration, state, logs, and any files requiring persistency.
4444

45-
Browse to `http://your-host-ip:8181` to access the Nginx Proxy Manager web interface.
45+
Access the Nginx Proxy Manager GUI by browsing to `http://your-host-ip:8181`.
4646

4747
## Documentation
4848

4949
Full documentation is available at https://github.com/jlesage/docker-nginx-proxy-manager.
5050

5151
## Support or Contact
5252

53-
Having troubles with the container or have questions? Please
54-
[create a new issue].
53+
Having troubles with the container or have questions? Please
54+
[create a new issue](https://github.com/jlesage/docker-nginx-proxy-manager/issues).
5555

56-
For other great Dockerized applications, see https://jlesage.github.io/docker-apps.
57-
58-
[create a new issue]: https://github.com/jlesage/docker-nginx-proxy-manager/issues
56+
For other Dockerized applications, visit https://jlesage.github.io/docker-apps.

Dockerfile

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG DOCKER_IMAGE_VERSION=
99

1010
# Define software versions.
1111
ARG OPENRESTY_VERSION=1.27.1.1
12-
ARG NGINX_PROXY_MANAGER_VERSION=2.12.1
12+
ARG NGINX_PROXY_MANAGER_VERSION=2.12.3
1313
ARG NGINX_HTTP_GEOIP2_MODULE_VERSION=3.3
1414
ARG LIBMAXMINDDB_VERSION=1.5.0
1515
ARG BCRYPT_TOOL_VERSION=1.1.2
@@ -25,19 +25,21 @@ ARG LIBMAXMINDDB_URL=https://github.com/maxmind/libmaxminddb/releases/download/$
2525
# Get Dockerfile cross-compilation helpers.
2626
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
2727

28-
# Get Python cryptography wheel. It is needed for certbot.
29-
FROM moonbuggy2000/python-musl-wheels:cryptography41.0.3-py3.10-${TARGETARCH}${TARGETVARIANT} AS mod_cryptography
28+
# Get Python cryptography wheel. It is needed for certbot.
29+
FROM moonbuggy2000/python-musl-wheels:cryptography43.0.0-py3.11-${TARGETARCH}${TARGETVARIANT} AS mod_cryptography
3030

31-
# Build UPX.
32-
FROM --platform=$BUILDPLATFORM alpine:3.16 AS upx
33-
RUN apk --no-cache add build-base curl make cmake git && \
31+
# Get UPX (statically linked).
32+
# NOTE: UPX 5.x is not compatible with old kernels, e.g. 3.10 used by some
33+
# Synology NASes. See https://github.com/upx/upx/issues/902
34+
FROM --platform=$BUILDPLATFORM alpine:3.20 AS upx
35+
ARG UPX_VERSION=4.2.4
36+
RUN apk --no-cache add curl && \
3437
mkdir /tmp/upx && \
35-
curl -# -L https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-src.tar.xz | tar xJ --strip 1 -C /tmp/upx && \
36-
make -C /tmp/upx build/release-gcc -j$(nproc) && \
37-
cp -v /tmp/upx/build/release-gcc/upx /usr/bin/upx
38+
curl -# -L https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz | tar xJ --strip 1 -C /tmp/upx && \
39+
cp -v /tmp/upx/upx /usr/bin/upx
3840

3941
# Build Nginx Proxy Manager.
40-
FROM --platform=$BUILDPLATFORM alpine:3.16 AS npm
42+
FROM --platform=$BUILDPLATFORM alpine:3.18 AS npm
4143
ARG TARGETPLATFORM
4244
ARG NGINX_PROXY_MANAGER_VERSION
4345
ARG NGINX_PROXY_MANAGER_URL
@@ -46,7 +48,7 @@ COPY src/nginx-proxy-manager /build
4648
RUN /build/build.sh "$NGINX_PROXY_MANAGER_VERSION" "$NGINX_PROXY_MANAGER_URL"
4749

4850
# Build OpenResty (nginx).
49-
FROM --platform=$BUILDPLATFORM alpine:3.16 AS nginx
51+
FROM --platform=$BUILDPLATFORM alpine:3.18 AS nginx
5052
ARG TARGETPLATFORM
5153
ARG OPENRESTY_URL
5254
ARG NGINX_HTTP_GEOIP2_MODULE_URL
@@ -57,7 +59,7 @@ RUN /build/build.sh "$OPENRESTY_URL" "$NGINX_HTTP_GEOIP2_MODULE_URL" "$LIBMAXMIN
5759
RUN xx-verify /tmp/openresty-install/usr/sbin/nginx
5860

5961
# Build bcrypt-tool.
60-
FROM --platform=$BUILDPLATFORM alpine:3.16 AS bcrypt-tool
62+
FROM --platform=$BUILDPLATFORM alpine:3.18 AS bcrypt-tool
6163
ARG TARGETPLATFORM
6264
ARG BCRYPT_TOOL_VERSION
6365
COPY --from=xx / /
@@ -68,17 +70,17 @@ COPY --from=upx /usr/bin/upx /usr/bin/upx
6870
RUN upx /tmp/go/bin/bcrypt-tool
6971

7072
# Build certbot.
71-
FROM alpine:3.16 AS certbot
73+
FROM alpine:3.18 AS certbot
7274
COPY --from=mod_cryptography / /wheels
7375
RUN \
7476
apk --no-cache add build-base curl python3 && \
7577
curl -# -L "https://bootstrap.pypa.io/get-pip.py" | python3 && \
7678
pip install --no-cache-dir --root=/tmp/certbot-install --prefix=/usr --find-links /wheels/ --prefer-binary --only-binary=:all: certbot && \
77-
find /tmp/certbot-install/usr/lib/python3.10/site-packages -type f -name "*.so" -exec strip {} ';' && \
78-
find /tmp/certbot-install/usr/lib/python3.10/site-packages -type f -name "*.h" -delete && \
79-
find /tmp/certbot-install/usr/lib/python3.10/site-packages -type f -name "*.c" -delete && \
80-
find /tmp/certbot-install/usr/lib/python3.10/site-packages -type f -name "*.exe" -delete && \
81-
find /tmp/certbot-install/usr/lib/python3.10/site-packages -type d -name tests -print0 | xargs -0 rm -r
79+
find /tmp/certbot-install/usr/lib/python3.11/site-packages -type f -name "*.so" -exec strip {} ';' && \
80+
find /tmp/certbot-install/usr/lib/python3.11/site-packages -type f -name "*.h" -delete && \
81+
find /tmp/certbot-install/usr/lib/python3.11/site-packages -type f -name "*.c" -delete && \
82+
find /tmp/certbot-install/usr/lib/python3.11/site-packages -type f -name "*.exe" -delete && \
83+
find /tmp/certbot-install/usr/lib/python3.11/site-packages -type d -name tests -print0 | xargs -0 rm -r
8284

8385
# Build cs-openresty-boucner.
8486
FROM alpine:3.16 AS cs-openresty-bouncer
@@ -89,7 +91,7 @@ COPY src/cs-openresty-bouncer /build
8991
RUN /build/build.sh "$CROWDSEC_OPENRESTY_BOUNCER_URL"
9092

9193
# Pull base image.
92-
FROM jlesage/baseimage:alpine-3.16-v3.6.4
94+
FROM jlesage/baseimage:alpine-3.18-v3.7.1
9395

9496
ARG NGINX_PROXY_MANAGER_VERSION
9597
ARG DOCKER_IMAGE_VERSION
@@ -105,7 +107,6 @@ RUN \
105107
python3 \
106108
sqlite \
107109
openssl \
108-
apache2-utils \
109110
# For /opt/nginx-proxy-manager/bin/handle-ipv6-setting.
110111
bash \
111112
# For openresty.
@@ -114,10 +115,10 @@ RUN \
114115
&& \
115116
# Install pip.
116117
# NOTE: pip from the Alpine package repository is debundled, meaning that
117-
# its dependencies are part of the system-wide ones. This save a lot
118+
# its dependencies are part of the system-wide ones. This save a lot
118119
# of space, but these dependencies conflict with the ones required by
119120
# Certbot plugins. Thus, we need to manually install pip (with its
120-
# built-in dependencies). See:
121+
# built-in dependencies). See:
121122
# https://pip.pypa.io/en/stable/development/vendoring-policy/
122123
curl -# -L "https://bootstrap.pypa.io/get-pip.py" | python3
123124

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Jocelyn Le Sage
3+
Copyright (c) 2025 Jocelyn Le Sage
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)