在服务器上运行我既码头工人图像和后缀SMTP服务器。smtp 服务器可通过 localhost 访问,并且未安装在任何类型的容器中。
问题是我可以在任何容器外使用 sendemail 通过终端发送电子邮件,但我无法通过在任何容器内运行 sendemail 的终端发送电子邮件。
后缀配置如下:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the …
Run Code Online (Sandbox Code Playgroud) 在 docker 映像的入口点 shell 脚本上,我想确定 postgresql 容器是否可以侦听连接。对于 mysql,我使用了以下代码段:
while ! mysqladmin ping -h"$MOODLE_DB_HOST" -P $MOODLE_DB_PORT --silent; do
echo "Connecting to ${MOODLE_DB_HOST} Failed"
sleep 1
done
Run Code Online (Sandbox Code Playgroud)
如何使用 postgresql 实现类似的功能?
我已经使用 certbot 的 --standalone 选项创建了一些证书,但我想更新它们所以我运行(测试是否会更新):
sudo certbot renew --dry-run
Run Code Online (Sandbox Code Playgroud)
但是对于某些域,我收到错误
Attempting to renew cert from /etc/letsencrypt/renewal/example.org.conf produced an unexpected error: Missing command line flag or config entry for this setting:
Select the webroot for example.org:
Choices: ['Enter a new webroot', '/var/www/ellakcy/']
(You can set this with the --webroot-path flag). Skipping.
Run Code Online (Sandbox Code Playgroud)
所以我希望在运行时sudo certbot renew
能够自动更新我的证书,而无需提供 webroot 路径。
我怎么能做到这一点?