x
This commit is contained in:
+8
-6
@@ -41,6 +41,7 @@ RUN apk update && apk add --no-cache \
|
|||||||
php-dev \
|
php-dev \
|
||||||
php-pear-grpc \
|
php-pear-grpc \
|
||||||
curl \
|
curl \
|
||||||
|
wget \
|
||||||
git
|
git
|
||||||
|
|
||||||
# 安装gRPC扩展
|
# 安装gRPC扩展
|
||||||
@@ -54,25 +55,26 @@ RUN mkdir -p /usr/local/sillyGirl \
|
|||||||
&& ARCH=$(uname -m) \
|
&& ARCH=$(uname -m) \
|
||||||
&& DOWNLOAD_URL="" \
|
&& DOWNLOAD_URL="" \
|
||||||
&& if [ "$ARCH" = "x86_64" ]; then \
|
&& if [ "$ARCH" = "x86_64" ]; then \
|
||||||
DOWNLOAD_URL="https://github.com/cdle/sillyGirl/releases/download/main/sillyGirl_linux_amd64"; \
|
DOWNLOAD_URL="/releases/download/main/sillyGirl_linux_amd64"; \
|
||||||
elif [ "$ARCH" = "aarch64" ]; then \
|
elif [ "$ARCH" = "aarch64" ]; then \
|
||||||
DOWNLOAD_URL="https://github.com/cdle/sillyGirl/releases/download/main/sillyGirl_linux_arm64"; \
|
DOWNLOAD_URL="/releases/download/main/sillyGirl_linux_arm64"; \
|
||||||
elif [ "$ARCH" = "armv7l" ]; then \
|
elif [ "$ARCH" = "armv7l" ]; then \
|
||||||
DOWNLOAD_URL="https://github.com/cdle/sillyGirl/releases/download/main/sillyGirl_linux_armv7"; \
|
DOWNLOAD_URL="/releases/download/main/sillyGirl_linux_armv7"; \
|
||||||
else \
|
else \
|
||||||
echo "Unsupported architecture: $ARCH"; \
|
echo "Unsupported architecture: $ARCH"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi \
|
fi \
|
||||||
&& curl -sSL --connect-timeout 20 -f "$DOWNLOAD_URL" -o /usr/local/sillyGirl/sillyGirl \
|
&& curl -L -sSL -f "https://gitee.com/sillybot/sillyGirl$DOWNLOAD_URL" -o /usr/local/sillyGirl/sillyGirl \
|
||||||
|| (echo "Download from original address failed, trying proxy address..." \
|
|| (echo "Download from original address failed, trying proxy address..." \
|
||||||
&& curl -sSL --connect-timeout 60 -f https://ghproxy.com/"$DOWNLOAD_URL" -o /usr/local/sillyGirl/sillyGirl) \
|
&& curl -sSL --connect-timeout 10 -f "https://github.com/cdle/sillyGirl$DOWNLOAD_URL" -o /usr/local/sillyGirl/sillyGirl) \
|
||||||
&& chmod +x /usr/local/sillyGirl/sillyGirl
|
&& chmod +x /usr/local/sillyGirl/sillyGirl
|
||||||
|
|
||||||
# 设置工作目录
|
# 设置工作目录
|
||||||
WORKDIR /usr/local/sillyGirl
|
WORKDIR /usr/local/sillyGirl
|
||||||
|
|
||||||
|
|
||||||
|
ENV PATH="/usr/local/sillyGirl/language/node/yarn:${PATH}"
|
||||||
|
ENV PATH="/usr/local/sillyGirl/language/node:${PATH}"
|
||||||
ENV SILLYGIRL_DATA_PATH=/usr/local/sillyGirl/
|
ENV SILLYGIRL_DATA_PATH=/usr/local/sillyGirl/
|
||||||
|
|
||||||
# 指定容器启动时要运行的命令
|
# 指定容器启动时要运行的命令
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ func initLanguage() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if _, err := os.Stat(node_dir + "/yarn"); err != nil {
|
if _, err := os.Stat(node_dir + "/yarn"); err != nil {
|
||||||
fmt.Println(err, 1)
|
|
||||||
resp, err := http.Get("https://gitee.com/sillybot/binary/releases/download/yarn/yarn.zip")
|
resp, err := http.Get("https://gitee.com/sillybot/binary/releases/download/yarn/yarn.zip")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
go func() {
|
go func() {
|
||||||
|
|||||||
@@ -77,10 +77,10 @@ func main() {
|
|||||||
fmt.Printf("\x1b[%dm%s \x1b[0m\n", 31, m[core.CONETNT])
|
fmt.Printf("\x1b[%dm%s \x1b[0m\n", 31, m[core.CONETNT])
|
||||||
return fmt.Sprint(i)
|
return fmt.Sprint(i)
|
||||||
})
|
})
|
||||||
a.SetActionHandler(func(m map[string]interface{}) string {
|
// a.SetActionHandler(func(m map[string]interface{}) string {
|
||||||
fmt.Println(`do action: ` + string(utils.JsonMarshal(m)))
|
// fmt.Println(`do action: ` + string(utils.JsonMarshal(m)))
|
||||||
return ""
|
// return ""
|
||||||
})
|
// })
|
||||||
|
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
data := scanner.Text()
|
data := scanner.Text()
|
||||||
|
|||||||
Reference in New Issue
Block a user