当使用 docker-compose 文件在 docker 容器中运行 mariadb 时,我无法让 mariadb 使用 3306 以外的其他端口。
我已经阅读了 mariadb/docker 文档,在线搜索并进行了自己的实验。
version: '3.1'
services:
db:
image: mariadb
restart: always
environment:
- MYSQL_ROOT_PASSWORD=mypassword
- MYSQL_TCP_PORT=33030
- MYSQL_UNIX_PORT=33020
ports:
- "33020:33020"
Run Code Online (Sandbox Code Playgroud)
FROM: mariadb: 10.3.14
COPY mydbscript.sql /docker-entrypoint-initdb.d/
EXPOSE 33020
CMD ["mysqld"]
Run Code Online (Sandbox Code Playgroud)
它从不使用端口 33020。它仍然使用端口 3306。如何在运行时通过 docker-compose 文件动态传递端口?
我按照以下说明操作:
https://developers.google.com/identity/sign-in/web/sign-in
一切正常(登录用户),但我无法签署用户.我收到以下错误:
未捕获的gapi.auth2.ExternallyVisibleError:gapi.auth2已使用不同的选项进行初始化
执行时失败:
auth2 = gapi.auth2.init();
Run Code Online (Sandbox Code Playgroud)
(https://developers.google.com/identity/sign-in/web/sign-in#sign_out_a_user)
我需要代码示例来从我的网络应用程序中退出用户,并且还要从Google帐户中完全签署用户.