Skip to content

Commit

Permalink
fix: modify dockerfile.allinone
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Zhang <[email protected]>
  • Loading branch information
zzzhangqi committed Sep 11, 2024
1 parent 73e75c2 commit c4ae7fc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
25 changes: 12 additions & 13 deletions Dockerfile.allinone
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,11 @@ RUN python -m venv --copies /app/ui/py_venv && \
pip install -r requirements.txt $PYTHONPROXY && \
python manage.py collectstatic --noinput --ignore weavescope-src --ignore drf-yasg --ignore rest_framework

RUN git clone --depth=1 -b V6.0 https://github.com/goodrain/rainbond-chart /app/ui/rainbond-chart

# build console image
FROM python:3.6-slim-stretch

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo 'Asia/Shanghai' >/etc/timezone && \
echo "deb http://archive.debian.org/debian/ stretch main" > /etc/apt/sources.list && \
echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list && \
apt-get update && apt-get --no-install-recommends install -y \
curl mysql-client sqlite3 default-libmysqlclient-dev && \
rm -rf /var/lib/apt/lists/*

ARG RELEASE_DESC=
ARG VERSION
ARG ARCH=amd64
Expand All @@ -45,14 +39,19 @@ ARG INSTALL_VERSION
COPY --from=build-console /app/ui /app/ui
WORKDIR /app/ui

RUN mkdir -p /app/logs /app/data /root/.ssh && \
apt-get update && apt-get install wget -y && \
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo 'Asia/Shanghai' >/etc/timezone && \
echo "deb http://archive.debian.org/debian/ stretch main" > /etc/apt/sources.list && \
echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list && \
apt-get update && apt-get --no-install-recommends install -y \
curl mysql-client sqlite3 default-libmysqlclient-dev && \
if [ ${ARCH} = "arm64" ] || [ ${ARCH} = "aarch64" ]; then \
wget -O /usr/local/bin/helm "https://pkg.goodrain.com/pkg/helm/v3.10.1/helm-arm64" && chmod +x /usr/local/bin/helm; \
curl "https://pkg.goodrain.com/pkg/helm/v3.10.1/helm-arm64" -o /usr/local/bin/helm && chmod +x /usr/local/bin/helm; \
else \
wget -O /usr/local/bin/helm "https://pkg.goodrain.com/pkg/helm/v3.10.1/helm" && chmod +x /usr/local/bin/helm; \
curl "https://pkg.goodrain.com/pkg/helm/v3.10.1/helm" -o /usr/local/bin/helm && chmod +x /usr/local/bin/helm; \
fi && \
rm -rf /var/lib/apt/lists/*
mkdir -p /app/logs /app/data /root/.ssh && \
rm -rf /var/lib/apt/lists/*

ENV PATH=/app/ui/py_venv/bin:$PATH
ENV PORT 7070
Expand Down
2 changes: 1 addition & 1 deletion script/install-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ start_rke2_systemd() {
info "Starting RKE2 server, Please wait about 10 minutes. You can open new terminal to check the status with 'systemctl status rke2-server' and logs with 'journalctl -fu rke2-server'"
systemctl start rke2-server.service
if [ "$IS_SERVER" = "true" ]; then
curl -sfSL --connect-timeout 5 --request PUT "$RBD_URL/console/cluster" --form 'kubeconfig=@"/etc/rancher/rke2/rke2.yaml"'
curl -sfSL --connect-timeout 5 --request PUT "$RBD_URL/console/cluster" --form 'kubeconfig=@"/etc/rancher/rke2/rke2.yaml"' > /dev/null
fi

fi
Expand Down

0 comments on commit c4ae7fc

Please sign in to comment.