日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

運行時容器鏡像信息

鏡像基本信息

  • 鏡像名稱:alinode

  • 鏡像性質:公開

  • 公網地址:docker pull registry.cn-hangzhou.aliyuncs.com/aliyun-node/alinode

  • 經典內網:docker pull registry-internal.cn-hangzhou.aliyuncs.com/aliyun-node/alinode

  • VPC網絡:docker pull registry-vpc.cn-hangzhou.aliyuncs.com/aliyun-node/alinode

  • 鏡像版本

鏡像內容

  • 與社區 Node.js 一一對應的運行時。對應關系

  • agenthub 源碼

  • agenthub 啟動腳本:置于容器根目錄下。

 #!/bin/sh
ENABLE_NODE_LOG=NO node $HOME/default.config.js
if [ -f $HOME/agenthub-running.json ]; then
  ENABLE_NODE_LOG=NO agenthub start $HOME/agenthub-running.json
fi
exec "$@"

構建用戶鏡像(hello world)

mkdir test
touch hello.js
# 復制下面的 hello.js
touch Dockerfile
# 復制下面的 Dockerfile
docker build -t hello .

hello.js

const http = require('http');
http.createServer(function (req, res) {
  res.end('hello from alinode docker!\n');
}).listen(7001);

Dockerfile

FROM registry.cn-hangzhou.aliyuncs.com/aliyun-node/alinode:3.13.0
COPY ./hello.js /root/
CMD node /root/hello.js

運行用戶鏡像

docker run -d -p 7001:7001 -e "APP_ID=your_app_id" -e "APP_SECRET=your_app_secret" hello

創建應用,獲得 appidsecret

傳入 agenthub 配置的方法

通過命令行

 docker run -d -p 7001:7001 -e "APP_ID=your_app_id" -e "APP_SECRET=your_app_secret" hello

注意:通過命令行只能傳入 appidsecret

通過配置文件

將配置寫到文件 process.env.HOME/app-config.json 中。

{
  "appid": "your_app_id",
  "secret": "your_app_secret",
  "error_log": ["/path/to/your/error.log"],
  "packages": ["/path/to/your/package.json"]
}

注意:在制作用戶鏡像時,配置文件只能是 process.env.HOME/app-config.json。文件名和路徑都不能更改。

如果使用 egg 集成框架

無需啟動 agenthub。

注意

  • 容器內 coredump 生成規則會繼承宿主機設置,如果 core_pattern 指定了一個容器中不存在的應用來處理,會造成無法生成 coredump。下面是幾個 core_pattern 的例子。值得注意的是,如果指定由 apport 來處理,然而容器內沒有安裝 apport,那么 coredump 就不會生成。

# 生成的coredump存放在/cloud/data/corefile/目錄
# %e 程序名稱
# %p pid
# %t dump的時間
# %h hostname
cat /proc/sys/kernel/core_pattern 
/cloud/data/corefile/core-%e-%p-%t-%h

# 生成coredump到當前目錄,文件名為core,如果已經存在core文件,那么新的coredump不會生成
cat /proc/sys/kernel/core_pattern 
core

# coredump由 apport 來處理
# /usr/share/apport/apport <pid> <signal number> <core file ulimit> <dump mode> [global pid]
cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c