Skip to content

Commit

Permalink
fix: docker image use apache namespace (apache#1529)
Browse files Browse the repository at this point in the history
## Rationale
After donate ceresdb to ASF, we should publish docker image under
apache.
- https://hub.docker.com/r/apache/horaemeta-server
- https://hub.docker.com/r/apache/horaedb-server

## Detailed Changes
Use `DOCKERHUB_USER ` `DOCKERHUB_TOKEN` to publish image. See details:
https://issues.apache.org/jira/browse/INFRA-25736

## Test Plan
Manually.
-
https://github.com/jiacai2050/incubator-horaedb/actions/runs/9029607730

---------

Co-authored-by: chunshao.rcs <chunshao@apache.org>
  • Loading branch information
jiacai2050 and chunshao90 authored May 10, 2024
1 parent 3fef06d commit 148790c
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ name: Publish Docker image

on:
workflow_dispatch:
push:
tags:
- 'v*'
inputs:
version:
description: Version to release
required: true

jobs:
docker:
if: github.repository_owner == 'FIXME'
horaemeta:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -35,11 +35,30 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push HoraeMeta Server Docker Image
uses: docker/build-push-action@v3
with:
context: horaemeta
push: true
tags: apache/horaemeta-server:latest,apache/horaemeta-server:${{ inputs.version }}

horaedb:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push HoraeDB Server Docker Image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: apache/horaemeta-server:latest,horaedb/horaemeta-server:${{github.ref_name}}
tags: apache/horaedb-server:latest,apache/horaedb-server:${{ inputs.version }}
File renamed without changes.
3 changes: 2 additions & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)
[![CI](https://github.com/apache/incubator-horaedb/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-horaedb/actions/workflows/ci.yml)
[![OpenIssue](https://img.shields.io/github/issues/apache/incubator-horaedb)](https://github.com/apache/incubator-horaedb/issues)
<!-- [![Docker](https://img.shields.io/docker/v/apache/horaedb-server?logo=docker)](https://hub.docker.com/r/apache/horaedb-server) TODO need to wait for first apache version release. -->
[![HoraeDB Docker](https://img.shields.io/docker/v/apache/horaedb-server?logo=docker&label=horaedb-server)](https://hub.docker.com/r/apache/horaedb-server)
[![HoraeMeta Docker](https://img.shields.io/docker/v/apache/horaemeta-server?logo=docker&label=horaemeta-server)](https://hub.docker.com/r/apache/horaemeta-server)

[English](./README.md)

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)
[![CI](https://github.com/apache/incubator-horaedb/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-horaedb/actions/workflows/ci.yml)
[![OpenIssue](https://img.shields.io/github/issues/apache/incubator-horaedb)](https://github.com/apache/incubator-horaedb/issues)
<!-- [![Docker](https://img.shields.io/docker/v/horaedb/horaedb-server?logo=docker)](https://hub.docker.com/r/horaedb/horaedb-server) TODO need to wait for first apache version release.-->
[![HoraeDB Docker](https://img.shields.io/docker/v/apache/horaedb-server?logo=docker&label=horaedb-server)](https://hub.docker.com/r/apache/horaedb-server)
[![HoraeMeta Docker](https://img.shields.io/docker/v/apache/horaemeta-server?logo=docker&label=horaemeta-server)](https://hub.docker.com/r/apache/horaemeta-server)

[中文](./README-CN.md)

Expand Down
6 changes: 3 additions & 3 deletions horaemeta/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ RUN apt update && \
apt clean

COPY --from=build /horaemeta/bin/horaemeta-server /usr/bin/horaemeta-server
RUN chmod +x /usr/bin/horaemeta-server
COPY --from=build /horaemeta/docker/entrypoint.sh /entrypoint.sh
COPY --from=build /horaemeta/config/example-standalone.toml /etc/horaemeta/horaemeta.toml

COPY ./docker/entrypoint.sh /entrypoint.sh
COPY ./config/example-standalone.toml /etc/horaemeta/horaemeta.toml
RUN chmod +x /usr/bin/horaemeta-server

ARG TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
Expand Down

0 comments on commit 148790c

Please sign in to comment.