├── .dockerignore ├── Dockerfile ├── README.md ├── docker-compose.dev.yaml └── docker-compose.yaml /.dockerignore: -------------------------------------------------------------------------------- 1 | # Files specified here are not required for Docker 2 | # so ignoring them helps to reduce the container size 3 | # The Docker container MUST have the following files: 4 | # package.json yarn.lock server.js vue.config.js src/ services/ 5 | 6 | node_modules 7 | docs 8 | .git 9 | .github 10 | 11 | docker-compose* -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | 3 | ARG VERSION 4 | ARG TARGETARCH 5 | ENV TARGETARCH=${TARGETARCH:-amd64} 6 | 7 | WORKDIR /app 8 | 9 | ADD https://github.com/layou233/NeverIdle/releases/download/${VERSION}/NeverIdle-linux-${TARGETARCH} /app/NeverIdle 10 | 11 | RUN chmod a+x /app/NeverIdle 12 | 13 | # Usage of /app/NeverIdle: 14 | # -c duration 15 | # Interval for CPU waste 16 | # -m int 17 | # GiB of memory waste 18 | # -n duration 19 | # Interval for network speed test 20 | CMD ["/app/NeverIdle", "-c", "1h7m", "-m", "2", "-n", "2h1m"] 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # oracle-alive 3 | 4 | 容器化[layou233/NeverIdle](https://github.com/layou233/NeverIdle),Oracle 甲骨文保活,已在Oracle AMD和ARM机器上测试运行。 5 | 6 | ## Usage 7 | 8 | ### 1. docker cli 9 | 10 | ```shell 11 | # 删除已有的容器 12 | docker rm -f oracle-alive 13 | 14 | # 默认值启动, 消耗1G内存,AMD和大内存ARM机器需要自己指定参数,见下方 15 | docker run -idt --name oracle-alive --restart=always wbchn/oracle-alive:latest 16 | 17 | # 自定义参数: 自用AMD机器 18 | docker run -idt --name oracle-alive --restart=always wbchn/oracle-alive:latest /app/NeverIdle -c 1h17m -n 2h3m 19 | 20 | # 自定义参数: 自用ARM机器 21 | docker run -idt --name oracle-alive --restart=always wbchn/oracle-alive:latest /app/NeverIdle -c 1h17m -m 2 -n 2h3m 22 | ``` 23 | 24 | ### 2. docker compose 25 | 26 | ``` 27 | wget https://github.com/wbchn/oracle-alive/raw/master/docker-compose.yaml 28 | docker compose up -d 29 | ``` 30 | 31 | ## Build 32 | 33 | ```shell 34 | docker buildx create --use 35 | 36 | VER=0.1 37 | # building an image for platforms 38 | docker buildx build --platform linux/amd64,linux/arm64 --build-arg VERSION=$VER -t wbchn/oracle-alive:latest -t wbchn/oracle-alive:${VER} --push . 39 | ``` 40 | 41 | ## Other 42 | 43 | [1] [layou233/NeverIdle](https://github.com/layou233/NeverIdle) -------------------------------------------------------------------------------- /docker-compose.dev.yaml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | services: 3 | alive: 4 | build: 5 | context: "." 6 | dockerfile: dockerfile 7 | container_name: alive 8 | command: /app/NeverIdle -c 1h -m 1 -n 2h21m 9 | restart: always 10 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | services: 3 | alive: 4 | image: wbchn/oracle-alive:latest 5 | container_name: alive 6 | command: /app/NeverIdle -c 1h -m 2 -n 2h21m 7 | restart: always 8 | --------------------------------------------------------------------------------