Skip to content

Commit cf4f952

Browse files
committed
添加 Dockerfile 和部署脚本以支持 ssserver 的构建和推送
1 parent e0432b0 commit cf4f952

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

Dockerfile.dyn

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM docker.io/arloor/ubi-micro:10
2+
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone;
3+
ARG TARGET_PATH=/x86_64-unknown-linux-gnu
4+
COPY build/release${TARGET_PATH}/release/ssserver /
5+
ENTRYPOINT ["/ssserver"]

deploy.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
cargo build -r --bin ssserver --target x86_64-unknown-linux-gnu --target-dir build/release
2+
podman build . -f Dockerfile.dyn -t quay.io/arloor/app:ssserver --network host
3+
podman login quay.io
4+
podman push quay.io/arloor/app:ssserver
5+
6+
for host in us.arloor.dev; do
7+
ssh root@$host '
8+
. pass
9+
hostname;
10+
systemctl restart ss;
11+
podman rmi -a 2>/dev/null
12+
'
13+
done
14+
15+
16+

0 commit comments

Comments
 (0)