generated from snowdreamtech/alpine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4a3ee78
Showing
6 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Dockerfile | ||
build.sh | ||
README.md | ||
LICENSE | ||
.github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: CI Main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
jobs: | ||
buildx: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
# [Required] Access token with `workflow` scope. | ||
token: ${{ secrets.WORKFLOW_SECRET }} | ||
- | ||
name: Run GitHub Actions Version Updater | ||
uses: saadmk11/[email protected] | ||
with: | ||
# [Required] Access token with `workflow` scope. | ||
token: ${{ secrets.WORKFLOW_SECRET }} | ||
- | ||
# Add support for more platforms with QEMU (optional) | ||
# https://github.com/docker/setup-qemu-action | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- | ||
name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
- | ||
name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/riscv64,linux/s390x | ||
push: true | ||
tags: | | ||
snowdreamtech/alpine:latest | ||
snowdreamtech/alpine:3.20.0 | ||
snowdreamtech/alpine:3.20 | ||
snowdreamtech/alpine:3 | ||
ghcr.io/snowdreamtech/alpine:latest | ||
ghcr.io/snowdreamtech/alpine:3.20.0 | ||
ghcr.io/snowdreamtech/alpine:3.20 | ||
ghcr.io/snowdreamtech/alpine:3 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM alpine:3.20.0 | ||
|
||
LABEL maintainer="snowdream <[email protected]>" | ||
|
||
RUN apk add --no-cache tzdata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(The MIT License) | ||
|
||
Copyright (c) 2024-present SnowdreamTech Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
'Software'), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Alpine | ||
|
||
[![Alpine](http://dockeri.co/image/snowdreamtech/alpine)](https://hub.docker.com/r/snowdreamtech/alpine) | ||
|
||
Docker Image packaging for Alpine. (amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le,riscv64, s390x) | ||
|
||
# Run | ||
|
||
```bash | ||
docker run --rm snowdreamtech/alpine:latest | ||
``` | ||
|
||
```bash | ||
docker run -e TZ=Asia/Shanghai --rm snowdreamtech/alpine:latest | ||
``` | ||
|
||
# Development | ||
|
||
```bash | ||
docker buildx create --use --name build --node build --driver-opt network=host | ||
docker buildx build -t snowdreamtech/alpine --platform=linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/riscv64,linux/s390x . --push | ||
``` | ||
|
||
## Reference | ||
|
||
1. [使用 buildx 构建多平台 Docker 镜像](https://icloudnative.io/posts/multiarch-docker-with-buildx/) | ||
1. [使用 buildx 构建多平台 Docker 镜像](https://blog.bwcxtech.com/posts/43dd6afb/) | ||
1. [如何使用 docker buildx 构建跨平台 Go 镜像](https://waynerv.com/posts/building-multi-architecture-images-with-docker-buildx/#buildx-%E7%9A%84%E8%B7%A8%E5%B9%B3%E5%8F%B0%E6%9E%84%E5%BB%BA%E7%AD%96%E7%95%A5) | ||
1. [Building Multi-Arch Images for Arm and x86 with Docker Desktop](https://www.docker.com/blog/multi-arch-images/) | ||
1. [How to Rapidly Build Multi-Architecture Images with Buildx](https://www.docker.com/blog/how-to-rapidly-build-multi-architecture-images-with-buildx/) | ||
1. [Faster Multi-Platform Builds: Dockerfile Cross-Compilation Guide](https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/) | ||
1. [docker/buildx](https://github.com/docker/buildx) | ||
|
||
## Contact (备注:alpine) | ||
|
||
* Email: [email protected] | ||
* QQ: 3217680847 | ||
* QQ群: 949022145 | ||
* WeChat/微信群: sn0wdr1am | ||
|
||
## License | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
DOCKER_HUB_PROJECT=snowdreamtech/alpine | ||
|
||
GITHUB_PROJECT=ghcr.io/snowdreamtech/alpine | ||
|
||
docker buildx build --platform=linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/riscv64,linux/s390x \ | ||
-t ${DOCKER_HUB_PROJECT}:latest \ | ||
-t ${DOCKER_HUB_PROJECT}:3.20.0 \ | ||
-t ${DOCKER_HUB_PROJECT}:3.20 \ | ||
-t ${DOCKER_HUB_PROJECT}:3 \ | ||
-t ${GITHUB_PROJECT}:latest \ | ||
-t ${GITHUB_PROJECT}:3.20.0 \ | ||
-t ${GITHUB_PROJECT}:3.20 \ | ||
-t ${GITHUB_PROJECT}:3 \ | ||
. \ | ||
--push |