shell: docker run needs shell

don't want to get into parsing quotes!
This commit is contained in:
Girish Ramakrishnan
2024-02-22 10:34:56 +01:00
parent a6f078330f
commit 60994f9ed1
4 changed files with 42 additions and 41 deletions

View File

@@ -171,7 +171,7 @@ async function configureMail(mailFqdn, mailDomain, serviceConfig) {
const cmd = serviceConfig.recoveryMode ? '/bin/bash -c \'echo "Debug mode. Sleeping" && sleep infinity\'' : '';
const logLevel = serviceConfig.recoveryMode ? 'data' : 'info';
const runCmd = `docker run --restart=always -d --name="mail" \
const runCmd = `docker run --restart=always -d --name=mail \
--net cloudron \
--net-alias mail \
--log-driver syslog \
@@ -182,16 +182,16 @@ async function configureMail(mailFqdn, mailDomain, serviceConfig) {
--memory-swap ${memoryLimit} \
--dns 172.18.0.1 \
--dns-search=. \
-e CLOUDRON_MAIL_TOKEN="${cloudronToken}" \
-e CLOUDRON_RELAY_TOKEN="${relayToken}" \
-e CLOUDRON_MAIL_TOKEN=${cloudronToken} \
-e CLOUDRON_RELAY_TOKEN=${relayToken} \
-e LOGLEVEL=${logLevel} \
-v "${paths.MAIL_DATA_DIR}:/app/data" \
-v "${paths.MAIL_CONFIG_DIR}:/etc/mail:ro" \
-v ${paths.MAIL_DATA_DIR}:/app/data \
-v ${paths.MAIL_CONFIG_DIR}:/etc/mail:ro \
${ports} \
--label isCloudronManaged=true \
${readOnly} -v /run -v /tmp ${image} ${cmd}`;
await shell.exec('startMail', runCmd, {});
await shell.exec('startMail', runCmd, { shell: '/bin/bash' });
}
async function restart() {