This commit is contained in:
2026-03-14 20:02:05 +08:00
commit 2c0bf6b36a
5 changed files with 75 additions and 0 deletions

3
.dockerignore Normal file
View File

@@ -0,0 +1,3 @@
.git
.gitea
README.md

View File

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

9
Dockerfile Normal file
View File

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

14
README.md Normal file
View File

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

12
index.html Normal file
View File

@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>hello-world</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>Served from a multi-arch container image.</p>
</body>
</html>