From 0c3e1ab5cd22031274c6c22efdf6566b025b8f78 Mon Sep 17 00:00:00 2001 From: pexcn Date: Sun, 11 Dec 2022 01:22:50 +0800 Subject: [PATCH] docker: build with github actions --- .github/workflows/docker.yml | 32 ++++++++++++++++++++++++++++++++ docker/README.md | 8 ++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..db4f24a --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,32 @@ +name: Docker + +on: + push: + paths-ignore: + - '**.md' + +jobs: + build: + runs-on: ubuntu-22.04 + env: + TZ: Asia/Taipei + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/amd64 + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build Docker Image + uses: docker/build-push-action@v3 + with: + context: . + file: docker/Dockerfile + tags: phantun + platforms: linux/amd64 diff --git a/docker/README.md b/docker/README.md index d8f1aeb..c4dd3f6 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,3 +1,11 @@ # phantun (docker) +## Build + +```sh +docker build -t phantun -f docker/Dockerfile . +``` + +## Usage + It is recommended to use docker-compose, see [docker-compose.yml](docker-compose.yml) for details.