From 87c77d72cb6a20e9db19ad333e5ed5f93818e66b Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Sat, 10 Jan 2026 14:32:19 +0800 Subject: [PATCH] fix shell --- README.md | 16 +++++++++++++++- boot.sh | 2 +- docker_create.sh | 3 +++ stop.sh | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100755 docker_create.sh diff --git a/README.md b/README.md index a516e09..a6b0180 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,21 @@ aircon ===== +1. 项目的依赖是在本地下载的,然后上传到阿里云服务器 +2. 在阿里云服务上面使用了基于docker编译的方式, 镜像 erlang:25.3和南农服务器上面的一致 -An OTP application +```text +docker run --rm \ + -v $(pwd)/:/data/aircon \ + -w /data/aircon \ + erlang:25.3 \ + sh -c "\ + cd /data/aircon && \ + rebar3 compile && \ + rebar3 release && \ + rebar3 tar && \ + tar -czvf aircon.tgz boot.sh stop.sh Dockerfile .args.yaml \ + " +``` Build ----- diff --git a/boot.sh b/boot.sh index 28cf5d1..01e2149 100755 --- a/boot.sh +++ b/boot.sh @@ -1,3 +1,3 @@ #! /bin/bash -docker run -e TZ=Asia/Shanghai --hostname=aircon --net=host --restart=always -v /data/docker/aircon/:/data/aircon/ aircon:latest \ No newline at end of file +docker start aircon \ No newline at end of file diff --git a/docker_create.sh b/docker_create.sh new file mode 100755 index 0000000..5075bce --- /dev/null +++ b/docker_create.sh @@ -0,0 +1,3 @@ +#! /bin/bash + +docker create --name aircon -e TZ=Asia/Shanghai --hostname=aircon --net=host --restart=always -v /data/docker/aircon/:/data/aircon/ aircon:latest \ No newline at end of file diff --git a/stop.sh b/stop.sh index 0aeeda9..126a856 100755 --- a/stop.sh +++ b/stop.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker ps -a | grep "aircon:latest" | awk -F " " '{print $1}' | xargs docker stop | xargs docker rm \ No newline at end of file +docker stop -t 3 aircon \ No newline at end of file