File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' Dockerfile'
9+ - ' .github/workflows/build.yml'
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Set up Docker Buildx
20+ uses : docker/setup-buildx-action@v3
21+
22+ - name : Login to Docker Hub
23+ uses : docker/login-action@v3
24+ with :
25+ username : ${{ secrets.DOCKERHUB_USERNAME }}
26+ password : ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+ - name : Build and push
29+ uses : docker/build-push-action@v6
30+ with :
31+ context : .
32+ platforms : linux/amd64,linux/arm64
33+ push : true
34+ tags : |
35+ freelabspace/java-local:8
Original file line number Diff line number Diff line change 1+ FROM bellsoft/liberica-openjdk-debian:8-cds
2+
3+ LABEL maintainer="https://github.com/freemankevin/java-local"
4+
5+ ENV DEBIAN_FRONTEND=noninteractive
6+ ENV TZ=Asia/Shanghai
7+
8+ RUN apt-get update && apt-get install -y \
9+ tzdata \
10+ curl \
11+ net-tools \
12+ iputils-ping \
13+ software-properties-common \
14+ fonts-noto-cjk \
15+ && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
16+ && echo $TZ > /etc/timezone \
17+ && rm -rf /var/lib/apt/lists/*
You can’t perform that action at this time.
0 commit comments