Skip to content

优化镜像

优化镜像 #73

Workflow file for this run

name: Hadoop Docker
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: Build Docker Image
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: false
haskell: false
large-packages: false
docker-images: false
swap-storage: false
- name: Checkout
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: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
platforms: |
linux/amd64
linux/arm64
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/hadoop:latest
${{ secrets.DOCKER_USERNAME }}/hadoop:hadoop-3.3.6
ghcr.io/${{ secrets.DOCKER_USERNAME }}/hadoop:latest
ghcr.io/${{ secrets.DOCKER_USERNAME }}/hadoop:hadoop-3.3.6