Skip to content

Commit

Permalink
fix: del some files and 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 060b111 commit 73e75c2
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 281 deletions.
89 changes: 0 additions & 89 deletions .drone.yml

This file was deleted.

37 changes: 0 additions & 37 deletions Dockerfile

This file was deleted.

47 changes: 13 additions & 34 deletions Dockerfile.allinone
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
ARG IMAGE_NAMESPACE=rainbond
ARG VERSION=V5.4-dev

FROM rainbond/golang-gcc-buildstack:1.17-alpine3.16 as builder
ARG ADAPTOR_BRANCH=v5.7.1-release
ARG GOPROXY
ARG GITPROXY
ARG LDFLAGS="-w -s -linkmode external -extldflags '-static'"
ARG ARCH=amd64

ENV GOPROXY=${GOPROXY}
ENV CGO_ENABLED=1
ENV GOPATH=/go

RUN if [ ${ARCH} = "arm64" ] || [ ${ARCH} = "aarch64" ]; then \
wget https://pkg.rainbond.com/upx/upx-4.0.2-arm64_linux/upx && chmod +x upx && mv upx /usr/local/bin/upx; \
else \
apk add upx; \
fi && \
apk add git && git clone -b ${ADAPTOR_BRANCH} --depth=1 ${GITPROXY}https://github.com/goodrain/cloud-adaptor /go/src/goodrain.com/cloud-adaptor
WORKDIR /go/src/goodrain.com/cloud-adaptor/
RUN go build -ldflags "$LDFLAGS" -o /cloud-adaptor $PWD/cmd/cloud-adaptor && upx --best --lzma /cloud-adaptor && chmod +x /cloud-adaptor

# build ui
FROM ${IMAGE_NAMESPACE}/rainbond-ui:${VERSION} AS ui

Expand All @@ -47,20 +27,25 @@ RUN python -m venv --copies /app/ui/py_venv && \
python manage.py collectstatic --noinput --ignore weavescope-src --ignore drf-yasg --ignore rest_framework

# build console image
FROM rainbond/python:3.6-slim-stretch
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
ARG INSTALL_VERSION

COPY --from=builder /go/src/goodrain.com/cloud-adaptor/chart /app/chart
COPY --from=builder /cloud-adaptor /app/cloudadaptor
COPY --from=build-console /app/ui /app/ui
WORKDIR /app/ui

RUN mkdir -p /app/logs /app/data /root/.ssh && \
mv /app/ui/supervisord.conf /etc/supervisor/supervisord.conf && \
mv /app/ui/rainbond.conf /etc/supervisor/conf.d/rainbond.conf && \
apt-get update && apt-get install wget -y && \
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; \
Expand All @@ -74,17 +59,11 @@ ENV PORT 7070
ENV IS_OPEN_API=true
ENV RELEASE_DESC=${RELEASE_DESC}
ENV HOME_DIR=/app
# cloud adaptor
ENV DB_PATH=/app/data/cloudadaptor
ENV CHART_PATH=/app/chart
ENV CONFIG_DIR=/app/data/cloudadaptor
ENV HELM_PATH=/usr/local/bin/helm
ENV MYSQL_DB=console
ENV RAINBOND_VERSION=$INSTALL_VERSION
ENV OPERATOR_VERSION=$INSTALL_VERSION

VOLUME /app/data
VOLUME /app/logs
VOLUME /root/.ssh

CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ]
EXPOSE 7070

CMD [ "bash", "/app/ui/entrypoint.sh" ]
12 changes: 0 additions & 12 deletions Dockerfile.base

This file was deleted.

15 changes: 0 additions & 15 deletions daemon.json

This file was deleted.

11 changes: 0 additions & 11 deletions local_update.sh

This file was deleted.

19 changes: 0 additions & 19 deletions rainbond.conf

This file was deleted.

22 changes: 0 additions & 22 deletions supervisord.conf

This file was deleted.

15 changes: 0 additions & 15 deletions tips.md

This file was deleted.

27 changes: 0 additions & 27 deletions update_ui.sh

This file was deleted.

0 comments on commit 73e75c2

Please sign in to comment.