Skip to content

Commit

Permalink
fix: fix linux-arm64 image
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe committed Jan 24, 2025
1 parent 50beb00 commit 787fe06
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test-ubuntu-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:

- name: Pull custom ARM64 Docker image
run: |
docker pull --platform linux/arm64 kcllang/kcl-builder-arm64
docker pull --platform linux/arm64 ghcr.io/kcl-lang/kcl-builder-arm64
- name: Build in Docker
run: |
docker run --rm --platform linux/arm64 \
-v ${{ github.workspace }}:/workspace -w /workspace \
kcllang/kcl-builder-arm64 \
ghcr.io/kcl-lang/kcl-builder-arm64 \
/bin/bash -c "export KCL_BUILD_GIT_SHA=$(git rev-parse HEAD) && git config --global --add safe.directory /workspace && git config --global user.name 'GitHub Action' && git config --global user.email '[email protected]' && make && make release && _build/dist/linux/kclvm/bin/kclvm_cli version"
- name: Read VERSION file
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/kcl-builder-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ENV GOPATH=/go \
CARGO_NET_GIT_FETCH_WITH_CLI=true

# install rust and cargo
RUN wget -qO- https://sh.rustup.rs | sh -s -- -y \
RUN wget -qO- https://sh.rustup.rs | bash -s -- -y --default-toolchain 1.83.0 \
&& echo 'source $HOME/.cargo/env' >> $HOME/.ashrc \
&& . $HOME/.cargo/env \
&& cargo version \
Expand Down
4 changes: 2 additions & 2 deletions scripts/docker/kcl-builder-arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright The KCL Authors. All rights reserved.
# Builder for kcllang/kcl-builder-arm64 image
# Builder for ghcr.io/kcl-lang/kcl-builder-arm64 image

FROM arm64v8/ubuntu:20.04

Expand All @@ -12,7 +12,7 @@ RUN apt-get install -y curl make gcc git zlib1g-dev
RUN apt install -y pkg-config libssl-dev

# rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.83.0
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true

RUN cargo version
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/kcl-builder-centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN yum install -y wget

# rust
# https://www.rust-lang.org/tools/install
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.83.0
ENV PATH="/root/.cargo/bin:${PATH}"
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true

Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/kcl-builder-centos8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN yum -y install ca-certificates
# rust-1.54.0
# cargo 1.54.0
# RUN yum -y install rust cargo rustfmt
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.83.0
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc

ENV PATH="/root/.cargo/bin:${PATH}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/kcl-builder-fedora39/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN sed -i -e "s|#baseurl=http://download.example/pub/fedora/linux|baseurl=https
RUN dnf -y install make which wget git ca-certificates clang llvm-devel libffi-devel python3-devel

# rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.83.0
echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
ENV PATH="/root/.cargo/bin:${PATH}"
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
Expand Down
5 changes: 2 additions & 3 deletions scripts/docker/kcl-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright The KCL Authors. All rights reserved.

FROM ubuntu:22.04
FROM ghcr.io/zong-zhe/ubuntu:22.04

#RUN uname -a
#RUN cat /etc/os-release
Expand Down Expand Up @@ -28,7 +28,7 @@ RUN ln -sf /usr/local/python3.9/bin/python3.9 /usr/bin/python3.9

# rust
# https://www.rust-lang.org/tools/install
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.83.0
ENV PATH="/root/.cargo/bin:${PATH}"
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true

Expand All @@ -49,7 +49,6 @@ RUN mkdir -p /root/download && cd /root/download \
&& tar -zxvf go1.20.5.linux-amd64.tar.gz \
&& mv ./go /usr/local/go1.20.5
RUN ln -sf /usr/local/go1.20.5/bin/go /usr/bin/go
RUN rm -rf /root/download

ENV GOPATH=/go
ENV GOLANG_VERSION=1.20.5
Expand Down

0 comments on commit 787fe06

Please sign in to comment.