-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add build docker * add build docker
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: build docker | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- build | ||
push: | ||
branches: | ||
- build | ||
|
||
jobs: | ||
build-docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
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: Log in to Docker hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Create and push manifests w/o cache | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
file: build/DockerFile | ||
push: true | ||
tags: | | ||
${{ vars.DOCKER_PUSH_BASE }}/oceanbase/obdiag-builder:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM centos:7 | ||
RUN rm -rf /etc/yum.repos.d/* | ||
RUN curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo | ||
RUN yum install -y wget rpm-build | ||
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh --no-check-certificate | ||
RUN sh Miniconda3-latest-Linux-x86_64.sh -p /opt/miniconda3 -b | ||
RUN export PATH=/opt/miniconda3/bin:$PATH | ||
RUN /opt/miniconda3/bin/conda init | ||
RUN /opt/miniconda3/bin/conda create --name obdiag python=3.8 -y | ||
RUN source /opt/miniconda3/bin/activate obdiag | ||
RUN /opt/miniconda3/envs/obdiag/bin/python3.8 -m pip install --upgrade pip setuptools wheel | ||
RUN yum install -y gcc gcc-c++ make |