commit 2c0bf6b36a75d30e8844dc90a1d83dcce329fcef Author: wolves Date: Sat Mar 14 20:02:05 2026 +0800 routine diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8e1fd93 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.git +.gitea +README.md diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..c9505ca --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,37 @@ +name: Publish Container + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Check out source + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build and push multi-arch image + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b361100 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM busybox:1.37.0 + +WORKDIR /www + +COPY index.html /www/index.html + +EXPOSE 8080 + +CMD ["httpd", "-f", "-v", "-p", "8080", "-h", "/www"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..a2143ce --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# docker-hello-world + +This repository publishes `git.wolves.top/public/hello-world:latest` as a +single multi-architecture image with these platforms: + +- `linux/amd64` +- `linux/arm64` + +## Local test + +```bash +docker build -t hello-world:local . +docker run --rm -p 8080:8080 hello-world:local +``` diff --git a/index.html b/index.html new file mode 100644 index 0000000..86af78c --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + hello-world + + +

Hello, World!

+

Served from a multi-arch container image.

+ +