Skip to content

Commit 717105f

Browse files
committed
Revert installing certbot. This is handled by base image jc21/nginx-full now
Update path of certbot, and use the pip instead
1 parent a02d4ec commit 717105f

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

backend/internal/certificate.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const debug_mode = process.env.NODE_ENV !== 'production' || !!process.env.
1111
const le_staging = process.env.NODE_ENV !== 'production';
1212
const internalNginx = require('./nginx');
1313
const internalHost = require('./host');
14-
const certbot_command = '/usr/bin/certbot';
14+
const certbot_command = '/opt/certbot/bin/certbot';
1515
const le_config = '/etc/letsencrypt.ini';
1616
const dns_plugins = require('../global/certbot-dns-plugins');
1717

@@ -805,7 +805,7 @@ const internalCertificate = {
805805

806806
const credentials_loc = '/etc/letsencrypt/credentials/credentials-' + certificate.id;
807807
const credentials_cmd = 'mkdir -p /etc/letsencrypt/credentials 2> /dev/null; echo \'' + certificate.meta.dns_provider_credentials.replace('\'', '\\\'') + '\' > \'' + credentials_loc + '\' && chmod 600 \'' + credentials_loc + '\'';
808-
const prepare_cmd = 'pip3 install ' + dns_plugin.package_name + '==' + dns_plugin.package_version + ' ' + dns_plugin.dependencies;
808+
const prepare_cmd = 'pip install ' + dns_plugin.package_name + '==' + dns_plugin.package_version + ' ' + dns_plugin.dependencies;
809809

810810
// Whether the plugin has a --<name>-credentials argument
811811
const has_config_arg = certificate.meta.dns_provider !== 'route53' && certificate.meta.dns_provider !== 'duckdns';

backend/setup.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ const setupCertbotPlugins = () => {
187187
});
188188

189189
if (plugins.length) {
190-
const install_cmd = 'pip3 install ' + plugins.join(' ');
190+
const install_cmd = 'pip install ' + plugins.join(' ');
191191
promises.push(utils.exec(install_cmd));
192192
}
193193

docker/Dockerfile

+2-8
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,10 @@ ENV SUPPRESS_NO_CONFIG_WARNING=1 \
2020

2121
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
2222
&& apt-get update \
23-
&& apt-get install -y --no-install-recommends jq python3 python3-pip python3-setuptools libaugeas0 \
23+
&& apt-get install -y --no-install-recommends jq \
2424
&& apt-get clean \
2525
&& rm -rf /var/lib/apt/lists/*
2626

27-
# Certbot
28-
RUN pip3 install --upgrade pip \
29-
&& pip install certbot \
30-
&& ln -s /usr/local/bin/certbot /usr/bin/certbot \
31-
&& echo "Certbot version: $(certbot --version)"
32-
3327
# s6 overlay
3428
COPY scripts/install-s6 /tmp/install-s6
3529
RUN /tmp/install-s6 "${TARGETPLATFORM}" && rm -f /tmp/install-s6
@@ -47,7 +41,7 @@ RUN yarn install
4741
COPY docker/rootfs /
4842

4943
# Remove frontend service not required for prod, dev nginx config as well
50-
RUN rm -rf /etc/services.d/frontend RUN rm -f /etc/nginx/conf.d/dev.conf
44+
RUN rm -rf /etc/services.d/frontend /etc/nginx/conf.d/dev.conf
5145

5246
VOLUME [ "/data", "/etc/letsencrypt" ]
5347
ENTRYPOINT [ "/init" ]

docker/rootfs/root/.bashrc

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ alias h='cd ~;clear;'
1717
echo -e -n '\E[1;34m'
1818
figlet -w 120 "NginxProxyManager"
1919
echo -e "\E[1;36mVersion \E[1;32m${NPM_BUILD_VERSION:-2.0.0-dev} (${NPM_BUILD_COMMIT:-dev}) ${NPM_BUILD_DATE:-0000-00-00}\E[1;36m, OpenResty \E[1;32m${OPENRESTY_VERSION:-unknown}\E[1;36m, ${ID:-debian} \E[1;32m${VERSION:-unknown}\E[1;36m, Certbot \E[1;32m$(certbot --version)\E[0m"
20-
echo
20+
echo -e -n '\E[1;34m'
21+
cat /built-for-arch
22+
echo -e '\E[0m'

0 commit comments

Comments
 (0)