Skip to content

Commit 77eb618

Browse files
committed
Fix pip installs running as non-root user
1 parent 79fedfc commit 77eb618

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

backend/internal/certificate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ const internalCertificate = {
877877
const escapedCredentials = certificate.meta.dns_provider_credentials.replaceAll('\'', '\\\'').replaceAll('\\', '\\\\');
878878
const credentialsCmd = 'mkdir -p /etc/letsencrypt/credentials 2> /dev/null; echo \'' + escapedCredentials + '\' > \'' + credentialsLocation + '\' && chmod 600 \'' + credentialsLocation + '\'';
879879
// we call `. /opt/certbot/bin/activate` (`.` is alternative to `source` in dash) to access certbot venv
880-
let prepareCmd = '. /opt/certbot/bin/activate && pip install ' + dns_plugin.package_name + (dns_plugin.version_requirement || '') + ' ' + dns_plugin.dependencies + ' && deactivate';
880+
const prepareCmd = '. /opt/certbot/bin/activate && pip install --no-cache-dir --user ' + dns_plugin.package_name + (dns_plugin.version_requirement || '') + ' ' + dns_plugin.dependencies + ' && deactivate';
881881

882882
// Whether the plugin has a --<name>-credentials argument
883883
const hasConfigArg = certificate.meta.dns_provider !== 'route53';

backend/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const setupCertbotPlugins = () => {
131131
});
132132

133133
if (plugins.length) {
134-
const install_cmd = '. /opt/certbot/bin/activate && pip install ' + plugins.join(' ') + ' && deactivate';
134+
const install_cmd = '. /opt/certbot/bin/activate && pip install --no-cache-dir --user ' + plugins.join(' ') + ' && deactivate';
135135
promises.push(utils.exec(install_cmd));
136136
}
137137

docker/docker-compose.ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# WARNING: This is a CI docker-compose file used for building and testing of the entire app, it should not be used for production.
2-
version: "3"
2+
version: '3.8'
33
services:
44

55
fullstack-mysql:

docker/docker-compose.dev.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# WARNING: This is a DEVELOPMENT docker-compose file, it should not be used for production.
2-
version: "3.5"
2+
version: '3.8'
33
services:
4+
45
npm:
56
image: nginxproxymanager:dev
67
container_name: npm_core

0 commit comments

Comments
 (0)