Update v2.0 to support ARM
This commit is contained in:
parent
0480fc42bb
commit
45cc2f1e72
|
@ -0,0 +1,42 @@
|
|||
name: "serverstatus docker build"
|
||||
|
||||
env:
|
||||
PROJECT: serverstatus
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set tag
|
||||
id: tag
|
||||
run: |
|
||||
TAG=$(cat Dockerfile | awk 'NR==4 {print $3}')
|
||||
echo "::set-env name=TAG::$TAG"
|
||||
- name: Docker Hub login
|
||||
env:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
run: |
|
||||
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: crazy-max/ghaction-docker-buildx@v1
|
||||
with:
|
||||
buildx-version: latest
|
||||
- name: Build Dockerfile
|
||||
env:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform=linux/amd64,linux/arm64 \
|
||||
--output "type=image,push=true" \
|
||||
--file Dockerfile . \
|
||||
--tag $(echo "${DOCKER_USERNAME}" | tr '[:upper:]' '[:lower:]')/${{ env.PROJECT }}:latest \
|
||||
--tag $(echo "${DOCKER_USERNAME}" | tr '[:upper:]' '[:lower:]')/${{ env.PROJECT }}:${TAG}
|
|
@ -1,6 +1,7 @@
|
|||
FROM ubuntu:latest as builder
|
||||
FROM ubuntu:bionic-20200112 as builder
|
||||
MAINTAINER Stille <stille@ioiox.com>
|
||||
|
||||
ENV VERSION 2.0
|
||||
WORKDIR /
|
||||
|
||||
COPY . /
|
||||
|
@ -9,7 +10,7 @@ RUN apt-get update && \
|
|||
/bin/bash -c '/bin/echo -e "1\n\nn\n" | ./status.sh' && \
|
||||
cp -rf /web /usr/local/ServerStatus/
|
||||
|
||||
FROM nginx:latest
|
||||
FROM nginx:1.17.8
|
||||
MAINTAINER Stille <stille@ioiox.com>
|
||||
|
||||
COPY --from=builder /usr/local/ServerStatus/server /ServerStatus/server/
|
||||
|
@ -17,4 +18,4 @@ COPY --from=builder /usr/local/ServerStatus/web /usr/share/nginx/html/
|
|||
|
||||
EXPOSE 80 35601
|
||||
|
||||
CMD nohup sh -c '/etc/init.d/nginx start && /ServerStatus/server/sergate --config=/ServerStatus/server/config.json --web-dir=/usr/share/nginx/html'
|
||||
CMD nohup sh -c '/etc/init.d/nginx start && /ServerStatus/server/sergate --config=/ServerStatus/server/config.json --web-dir=/usr/share/nginx/html'
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
# ServerStatus
|
||||
## 简介
|
||||
ServerStatus 在 GitHub 上已经有各种版本,本项目是基于 [ToyoDAdoubi/ServerStatus-Toyo](https://github.com/ToyoDAdoubi/ServerStatus-Toyo) 一键脚本项目,并整合网友制作的[美化主题](https://www.hostloc.com/thread-494384-1-1.html),打包为 docker 镜像,方便一键安装和迁移.
|
||||
> *docker image support for X86 and ARM*
|
||||
|
||||
![screenshot](https://raw.githubusercontent.com/stilleshan/ServerStatus/master/screenshot.jpg)
|
||||
|
||||
## 更新
|
||||
**2021-06-06** 更新 docker 镜像同时支持 X86 和 ARM
|
||||
|
||||
## 部署
|
||||
### 创建配置文件
|
||||
推荐直接 **git clone** 本仓库到服务器 **/root** 目录内.或者手动下载仓库中的 **config.json** 至 **/root/ServerStatus/** 目录内.
|
||||
|
|
Loading…
Reference in New Issue