feat: update docker-ci workflow - arm64 support

This commit is contained in:
Zhang Minghan 2024-01-25 13:58:50 +08:00
parent bb0d1ab4ff
commit c4d330947d
2 changed files with 11 additions and 5 deletions

View File

@ -19,8 +19,14 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag programzmh/chatnio:latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Push to DockerHub
run: docker push programzmh/chatnio:latest
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: programzmh/chatnio:latest

View File

@ -9,7 +9,7 @@ COPY . .
# Set go proxy to https://goproxy.cn (open for vps in China Mainland)
# RUN go env -w GOPROXY=https://goproxy.cn,direct
ENV GOOS=linux GOARCH=amd64 GO111MODULE=on CGO_ENABLED=1
ENV GOOS=linux GO111MODULE=on CGO_ENABLED=1
# Install dependencies for cgo
RUN apk add --no-cache gcc musl-dev