mirror of
https://github.com/masonr/yet-another-bench-script.git
synced 2025-11-08 08:20:07 +05:30
feat: add container build
This commit is contained in:
parent
35ee337685
commit
7e6a90d2ed
4 changed files with 62 additions and 0 deletions
6
.dockerignore
Normal file
6
.dockerignore
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
.git
|
||||
.github
|
||||
bin/compile.sh
|
||||
bin/cross-compile.sh
|
||||
bin/README.md
|
||||
bin/example.json
|
||||
29
.github/workflows/docker.yml
vendored
Normal file
29
.github/workflows/docker.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
name: Container 📦
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7
|
||||
tags: ghcr.io/${{ github.repository }}:latest
|
||||
12
Dockerfile
Normal file
12
Dockerfile
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
FROM debian:stable-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates curl wget iputils-ping && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/yabs
|
||||
COPY bin ./bin
|
||||
COPY yabs.sh .
|
||||
RUN chmod +x yabs.sh
|
||||
|
||||
ENTRYPOINT ["./yabs.sh"]
|
||||
15
README.md
15
README.md
|
|
@ -32,6 +32,21 @@ wget -qO- yabs.sh | bash
|
|||
|
||||
**Windows Users**: This script can be run on Windows systems by using [Windows Subsystem for Linux v2 (WSL 2)](https://learn.microsoft.com/en-us/windows/wsl/about). WSLv1 will not run the script and binaries correctly.
|
||||
|
||||
### Docker
|
||||
|
||||
A container image is available from the GitHub Container Registry:
|
||||
|
||||
```sh
|
||||
docker run --rm ghcr.io/masonr/yet-another-bench-script
|
||||
```
|
||||
|
||||
Additional flags can be passed after the image name, for example:
|
||||
|
||||
```sh
|
||||
docker run --rm ghcr.io/masonr/yet-another-bench-script -f -i
|
||||
```
|
||||
|
||||
|
||||
### Flags (Skipping Tests, Reducing iperf Locations, Geekbench 4/5/6, etc.)
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue