Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 16 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,36 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM 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 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 clean all;

COPY --from=builder /work/build/system-agent /usr/local/bin/system-agent
COPY --from=builder /work/supervisord.conf /etc/supervisor/supervisord.conf
Expand Down