Skip to content

Commit 1091c35

Browse files
committed
[UPDATE]: oh yeah.
1 parent ec6dd63 commit 1091c35

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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/*

0 commit comments

Comments
 (0)