docker: build with github actions

This commit is contained in:
pexcn 2022-12-11 01:22:50 +08:00
parent a2d5cb5f03
commit 0c3e1ab5cd
2 changed files with 40 additions and 0 deletions

32
.github/workflows/docker.yml vendored Normal file
View File

@ -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

View File

@ -1,3 +1,11 @@
# phantun (docker) # 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. It is recommended to use docker-compose, see [docker-compose.yml](docker-compose.yml) for details.