Skip to content

Commit 84d3b34

Browse files
authored
Merge pull request #92 from stoneshi-yunify/master
create link docker to podman
2 parents e583fc1 + b24879d commit 84d3b34

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

.github/actions/build/action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ runs:
4646
- uses: actions/checkout@v4
4747
- name: Docker meta for KubeSphere
4848
id: meta
49-
if: github.repository_owner == 'kubesphere'
5049
uses: docker/metadata-action@v5
5150
with:
5251
images: |
@@ -55,21 +54,19 @@ runs:
5554
type=ref,event=branch,suffix=${{ inputs.tag-suffix }}
5655
type=ref,event=pr,suffix=${{ inputs.tag-suffix }}
5756
type=semver,pattern={{version}},prefix=v,suffix=${{ inputs.tag-suffix }}
58-
type=raw,value=latest
57+
type=raw,value=latest,suffix=${{ inputs.tag-suffix }}
5958
- name: Set up QEMU
6059
uses: docker/setup-qemu-action@v3
6160
- name: Set up Docker Buildx
6261
uses: docker/setup-buildx-action@v3
6362
- name: Login to DockerHub
64-
if: github.event_name != 'pull_request' && github.repository_owner == 'kubesphere'
6563
uses: docker/login-action@v3
6664
with:
6765
registry: ${{ inputs.docker-registry }}
6866
username: ${{ inputs.docker-namespace }}
6967
password: ${{ inputs.docker-password }}
7068
- name: Build and push Docker images
7169
uses: docker/build-push-action@v6
72-
if: github.repository_owner == 'kubesphere'
7370
with:
7471
context: ${{ inputs.context }}
7572
file: ${{ inputs.dockerfile }}

.github/workflows/build.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Build base agent
16+
- name: Build base agent for docker
1717
uses: ./.github/actions/build
1818
with:
1919
context: base
@@ -22,3 +22,14 @@ jobs:
2222
platforms: linux/amd64,linux/arm64
2323
docker-namespace: ${{ secrets.DOCKER_HUB_USER }}
2424
docker-password: ${{ secrets.DOCKER_HUB_SECRETS }}
25+
26+
- name: Build base agent for podman
27+
uses: ./.github/actions/build
28+
with:
29+
context: base
30+
dockerfile: base/podman/Dockerfile
31+
image-name: builder-base
32+
tag-suffix: -podman
33+
platforms: linux/amd64,linux/arm64
34+
docker-namespace: ${{ secrets.DOCKER_HUB_USER }}
35+
docker-password: ${{ secrets.DOCKER_HUB_SECRETS }}

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ Welcome to contribute.
2121
## Images
2222
Images for both production and development:
2323

24-
| Name | Introduction | Docker Pulls |
25-
|---------------------------|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
26-
| `kubesphere/builder-base` | [README](base/README.md) | [![Docker Pulls](https://img.shields.io/docker/pulls/kubesphere/builder-go.svg)](https://hub.docker.com/r/kubesphere/builder-go/tags) |
24+
| Name | Introduction | Docker Pulls |
25+
|---------------------------|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
26+
| `kubesphere/builder-base` | [README](base/README.md) | [![Docker Pulls](https://img.shields.io/docker/pulls/kubesphere/builder-base.svg)](https://hub.docker.com/r/kubesphere/builder-base/tags) |
27+
28+
**NOTE**
29+
1. The image with tag `x.y.z-podman` has the very same utilities installed compared to the `x.y.z` image, the only difference is that the `x.y.z-podman` image makes a symbolic link of `docker` to `podman`, for easy use and backward compatibility.
2730

2831
## Legacy Images
2932
Legacy images built on centos:7 are no longer developed but may be still working.

base/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,3 @@ Base image with latest common sdks and utilities built with ubuntu, include:
1717
- ks
1818
- ...
1919

20-
**NOTE**
21-
1. Because the image has both docker and podman installed, `docker` command is no longer a alias of `podman`, you should use `podman` command explicitly.
22-

base/podman/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM kubesphere/builder-base:latest
2+
RUN ln -s -f /usr/bin/podman /usr/bin/docker

0 commit comments

Comments
 (0)