小编Dim*_*las的帖子

将 docker 容器内的电子邮件发送到运行 postfix 的主机 smtp

在服务器上运行我码头工人图像和后缀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)

debian postfix docker

8
推荐指数
1
解决办法
1万
查看次数

Postgresql:如何确定数据库 docker 容器是否正在运行?

在 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 实现类似的功能?

postgresql bash docker

5
推荐指数
1
解决办法
1万
查看次数

Certbot 使用自动提供的 webroot 更新证书

我已经使用 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 路径。

我怎么能做到这一点?

certbot

4
推荐指数
1
解决办法
2156
查看次数

标签 统计

docker ×2

bash ×1

certbot ×1

debian ×1

postfix ×1

postgresql ×1