Skip to content

Commit

Permalink
Merge pull request #96 from chris-sun-star/arm-support
Browse files Browse the repository at this point in the history
support arm
  • Loading branch information
powerfooI authored Nov 13, 2023
2 parents 270ba63 + 0d48a67 commit 13e176d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ ARG RACE
WORKDIR /workspace
# copy everything
COPY . .
RUN GO11MODULE=ON CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build ${RACE} -o manager cmd/main.go
RUN GO11MODULE=ON CGO_ENABLED=1 GOOS=linux go build ${RACE} -o manager cmd/main.go

# start build docker image
FROM openanolis/anolisos:8.4-x86_64
FROM openanolis/anolisos:8.8
WORKDIR /
COPY --from=builder /workspace/manager .
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
Expand Down
2 changes: 1 addition & 1 deletion deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12722,7 +12722,7 @@ spec:
value: "true"
- name: TELEMETRY_REPORT_HOST
value: https://openwebapi.oceanbase.com
image: oceanbasedev/ob-operator:2.1.0-alpha.2
image: oceanbase/ob-operator:2.1.0
livenessProbe:
httpGet:
path: /healthz
Expand Down
5 changes: 3 additions & 2 deletions distribution/obagent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM openanolis/anolisos:8.4-x86_64
FROM openanolis/anolisos:8.8
ARG VERSION
ARG ARCH=x86_64
WORKDIR /home/admin/obagent
RUN yum install -y http://mirrors.aliyun.com/oceanbase/community/stable/el/8/x86_64/obagent-${VERSION}.el8.x86_64.rpm
RUN yum install -y http://mirrors.aliyun.com/oceanbase/community/stable/el/8/${ARCH}/obagent-${VERSION}.el8.${ARCH}.rpm
ADD replace_properties.sh /home/admin/obagent
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

Expand Down
2 changes: 1 addition & 1 deletion distribution/obagent/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
docker build -t $1:$2 --build-arg VERSION=$2 .
docker build -t $1:$2 --build-arg VERSION=$2 --build-arg ARCH=$3 .
9 changes: 5 additions & 4 deletions distribution/oceanbase/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ FROM golang:1.20.4 as builder
ARG GOPROXY=https://goproxy.io,direct
WORKDIR /workspace
COPY ./oceanbase-helper .
RUN GO11MODULE=ON CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o oceanbase-helper main.go
RUN GO11MODULE=ON CGO_ENABLED=0 GOOS=linux go build -a -o oceanbase-helper main.go

FROM openanolis/anolisos:8.4-x86_64
FROM openanolis/anolisos:8.8
ARG VERSION
ARG ARCH=x86_64
WORKDIR /home/admin/oceanbase
RUN mkdir -p /home/admin/oceanbase/bin
COPY --from=builder /workspace/oceanbase-helper /home/admin/oceanbase/bin
RUN yum -y install python27
RUN pip2 install mysql-connector -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
RUN yum install -y http://mirrors.aliyun.com/oceanbase/community/stable/el/8/x86_64/oceanbase-ce-libs-${VERSION}.el8.x86_64.rpm
RUN yum install -y http://mirrors.aliyun.com/oceanbase/community/stable/el/8/x86_64/oceanbase-ce-${VERSION}.el8.x86_64.rpm
RUN yum install -y http://mirrors.aliyun.com/oceanbase/community/stable/el/8/${ARCH}/oceanbase-ce-libs-${VERSION}.el8.${ARCH}.rpm
RUN yum install -y http://mirrors.aliyun.com/oceanbase/community/stable/el/8/${ARCH}/oceanbase-ce-${VERSION}.el8.${ARCH}.rpm
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV LD_LIBRARY_PATH /home/admin/oceanbase/lib
3 changes: 2 additions & 1 deletion distribution/oceanbase/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
docker build -t $1:$2 --build-arg GOPROXY=${GOPROXY} --build-arg VERSION=$2 .

docker build -t $1:$2 --build-arg GOPROXY=${GOPROXY} --build-arg VERSION=$2 --build-arg ARCH=$3 .

0 comments on commit 13e176d

Please sign in to comment.