mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 11:42:22 +08:00
Build arm32 docker image
This commit is contained in:
parent
898c206938
commit
104874d19e
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
|
@ -127,13 +127,16 @@ jobs:
|
|||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
- name: Build CLI
|
||||
run: dotnet build -c Release -o ./BililiveRecorder.Cli/bin/docker_out BililiveRecorder.Cli/BililiveRecorder.Cli.csproj
|
||||
# Build and push Docker image with Buildx (don't push on PR)
|
||||
# https://github.com/docker/build-push-action
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
file: ./Dockerfile.GitHubActions
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
|
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
|
@ -147,13 +147,16 @@ jobs:
|
|||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
- name: Build CLI
|
||||
run: dotnet build -c Release -o ./BililiveRecorder.Cli/bin/docker_out BililiveRecorder.Cli/BililiveRecorder.Cli.csproj
|
||||
# Build and push Docker image with Buildx (don't push on PR)
|
||||
# https://github.com/docker/build-push-action
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
file: ./Dockerfile.GitHubActions
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
FROM mcr.microsoft.com/dotnet/sdk:5.0
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine
|
||||
COPY . /src
|
||||
RUN cd /src/BililiveRecorder.Cli && dotnet build -o /output -c Release
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/runtime:5.0
|
||||
FROM mcr.microsoft.com/dotnet/runtime:5.0-alpine
|
||||
COPY --from=0 /output /app
|
||||
VOLUME [ "/rec" ]
|
||||
WORKDIR /app
|
||||
ENTRYPOINT [ "/app/BililiveRecorder.Cli" ]
|
||||
CMD [ "-h" ]
|
||||
CMD [ "-h" ]
|
||||
|
|
6
Dockerfile.GitHubActions
Normal file
6
Dockerfile.GitHubActions
Normal file
|
@ -0,0 +1,6 @@
|
|||
FROM mcr.microsoft.com/dotnet/runtime:5.0
|
||||
COPY ./BililiveRecorder.Cli/bin/docker_out /app
|
||||
VOLUME [ "/rec" ]
|
||||
WORKDIR /app
|
||||
ENTRYPOINT [ "dotnet", "/app/BililiveRecorder.Cli.dll" ]
|
||||
CMD [ "-h" ]
|
Loading…
Reference in New Issue
Block a user