From f82356791b1248c8eb7a78ba552ccc8efa493dd3 Mon Sep 17 00:00:00 2001 From: 100ask Date: Thu, 21 Dec 2023 21:41:08 -0500 Subject: [PATCH 1/3] Add support riscv64 --- .github/workflows/container.yml | 2 +- Dockerfile | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 6cea02b..24d8558 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -168,7 +168,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} builder: ${{ steps.buildx.outputs.name }} - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/riscv64 cache-from: type=gha cache-to: type=gha,mode=max file: Dockerfile diff --git a/Dockerfile b/Dockerfile index 3d5aec7..3eef54a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.20.6-bookworm as builder +FROM --platform=linux/amd64 golang:1.20.6-bookworm as builder WORKDIR /work/ @@ -23,26 +23,26 @@ RUN cd web/boxdocker && npm install && npm run build && mv dist boxdocker && \ zip -r static_html.zip boxdocker && mv static_html.zip ../../res && cd ../../ RUN go env -w GO111MODULE=on && make -f Makefile -FROM debian:12 +FROM xfan1024/openeuler:23.03-light ENV LANG C.UTF-8 ENV TZ=Asia/Shanghai \ DEBIAN_FRONTEND=noninteractive RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - netbase \ - tzdata \ - supervisor \ - iputils-ping \ - docker-compose \ - curl \ - cron \ - ; \ - apt remove docker.io -y ; \ - rm -rf /var/lib/apt/lists/* + yum -y update; \ + yum install -y \ + ca-certificates \ + net-tools \ + tzdata \ + supervisor \ + iputils \ + docker-compose \ + curl \ + cronie \ + ; \ + yum remove docker-* -y ; \ + yum clean all; COPY --from=builder /work/build/system-agent /usr/local/bin/system-agent COPY --from=builder /work/supervisord.conf /etc/supervisor/supervisord.conf From 4f532bc2cdd9e4bcb1813d2f3111dc024a9e4537 Mon Sep 17 00:00:00 2001 From: 100ask Date: Wed, 27 Dec 2023 08:35:10 -0500 Subject: [PATCH 2/3] fix support riscv64 --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3eef54a..4427e23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,14 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=linux/amd64 golang:1.20.6-bookworm as builder +FROM debian:experimental as builder WORKDIR /work/ COPY . . -RUN apt update && apt install npm nodejs zip -y -RUN cd web/boxdocker && npm install && npm run build && mv dist boxdocker && \ +RUN apt-get update && apt-get install golang-go npm nodejs zip -y +RUN cd web/boxdocker && npm update && npm install && npm run build && mv dist boxdocker && \ zip -r static_html.zip boxdocker && mv static_html.zip ../../res && cd ../../ RUN go env -w GO111MODULE=on && make -f Makefile From c2cf6746f964fe93c70f37e5e8b3b27c9677a171 Mon Sep 17 00:00:00 2001 From: 100ask Date: Thu, 4 Jan 2024 21:31:29 -0500 Subject: [PATCH 3/3] fix docker-compose --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4427e23..188665c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,6 @@ RUN set -eux; \ curl \ cronie \ ; \ - yum remove docker-* -y ; \ yum clean all; COPY --from=builder /work/build/system-agent /usr/local/bin/system-agent