add pull action in Makefile.

This commit is contained in:
kaichao 2023-11-08 22:26:36 +08:00
parent 6a9b554410
commit 407aba52b4
15 changed files with 41 additions and 12 deletions

View File

@ -10,6 +10,11 @@ push:
$(MAKE) -C $$dir push; \
done
pull:
@for dir in $(dirs); do \
$(MAKE) -C $$dir pull; \
done
clean:
@for dir in $(dirs); do \
$(MAKE) -C $$dir clean; \

View File

@ -22,9 +22,9 @@ ENV SOURCE_CLUSTER= \
COPY run.sh /app/bin/
COPY list-files.sh /usr/local/bin/
COPY --from=hub.cstcloud.cn/scalebox/base /usr/local/sbin/ /usr/local/sbin/
COPY --from=hub.cstcloud.cn/scalebox/list-dir /usr/local/bin/get_2d_meta /usr/local/bin/
COPY --from=hub.cstcloud.cn/scalebox/dir-list /usr/local/bin/get_2d_meta /usr/local/bin/
COPY --from=hub.cstcloud.cn/scalebox/base /usr/local/sbin/ /usr/local/sbin/
RUN mkdir -p /work/.scalebox /app/bin && echo "PATH=/app/bin:\${PATH}" >> /root/.bashrc
WORKDIR /work
ENTRYPOINT [ "goagent" ]

View File

@ -6,6 +6,9 @@ build:
push:
docker push $(IMAGE_NAME)
pull:
docker pull $(IMAGE_NAME)
clean:
docker rmi $(IMAGE_NAME)

View File

@ -6,6 +6,9 @@ build:
push:
docker push $(IMAGE_NAME)
pull:
docker pull $(IMAGE_NAME)
clean:
docker rmi $(IMAGE_NAME)

View File

@ -6,6 +6,9 @@ build:
push:
docker push $(IMAGE_NAME)
pull:
docker pull $(IMAGE_NAME)
clean:
docker rmi $(IMAGE_NAME)

View File

@ -3,11 +3,14 @@ IMAGE_NAME:=hub.cstcloud.cn/scalebox/data-grouping-2d
build:
DOCKER_BUILDKIT=1 docker build --network=host -t $(IMAGE_NAME) .
dist:
docker save $(IMAGE_NAME) | zstdmt | pv | ssh c0 'zstd -d | docker load'
push:
docker push $(IMAGE_NAME)
pull:
docker pull $(IMAGE_NAME)
clean:
docker rmi $(IMAGE_NAME)
dist:
docker save $(IMAGE_NAME) | zstdmt | pv | ssh c0 'zstd -d | docker load'

View File

@ -53,6 +53,6 @@ COPY run.sh /app/bin/
COPY list-files.sh /usr/local/bin/
COPY --from=hub.cstcloud.cn/scalebox/base /usr/local/sbin/ /usr/local/sbin/
RUN mkdir -p /work /app/bin && echo "PATH=/app/bin:\${PATH}" >> /root/.bashrc
RUN mkdir -p /work/.scalebox /app/bin && echo "PATH=/app/bin:\${PATH}" >> /root/.bashrc
WORKDIR /work
ENTRYPOINT [ "goagent" ]

View File

@ -6,6 +6,9 @@ build:
push:
docker push $(IMAGE_NAME)
pull:
docker pull $(IMAGE_NAME)
clean:
docker rmi $(IMAGE_NAME)

View File

@ -21,6 +21,6 @@ ENV SOURCE_URL= \
ENABLE_LOCAL_RELAY=no
COPY --from=hub.cstcloud.cn/scalebox/base /usr/local/sbin/ /usr/local/sbin/
RUN mkdir -p /work /app/bin && echo "PATH=/app/bin:\${PATH}" >> /root/.bashrc
RUN mkdir -p /work/.scalebox /app/bin && echo "PATH=/app/bin:\${PATH}" >> /root/.bashrc
WORKDIR /work
ENTRYPOINT [ "goagent" ]

View File

@ -6,5 +6,8 @@ build:
push:
docker push $(IMAGE_NAME)
pull:
docker pull $(IMAGE_NAME)
clean:
docker rmi $(IMAGE_NAME)

View File

@ -26,6 +26,6 @@ ENV SOURCE_URL= \
COPY *.sh /app/bin/
COPY --from=hub.cstcloud.cn/scalebox/base /usr/local/sbin/ /usr/local/sbin/
RUN mkdir -p /work /app/bin && echo "PATH=/app/bin:\${PATH}" >> /root/.bashrc
RUN mkdir -p /work/.scalebox /app/bin && echo "PATH=/app/bin:\${PATH}" >> /root/.bashrc
WORKDIR /work
ENTRYPOINT [ "goagent" ]

View File

@ -7,6 +7,9 @@ build:
push:
docker push $(IMAGE_NAME)
pull:
docker pull $(IMAGE_NAME)
clean:
docker rmi $(IMAGE_NAME)

View File

@ -40,7 +40,6 @@ CMD run.sh
FROM base
COPY --from=hub.cstcloud.cn/scalebox/base /usr/local/sbin/ /usr/local/sbin/
RUN mkdir -p /work /app/bin && echo "PATH=/app/bin:\${PATH}" >> /root/.bashrc
RUN mkdir -p /work/.scalebox /app/bin && echo "PATH=/app/bin:\${PATH}" >> /root/.bashrc
WORKDIR /work
CMD
ENTRYPOINT [ "goagent" ]

View File

@ -9,6 +9,10 @@ push:
docker push $(IMAGE_BASE)
docker push $(IMAGE_AGENT)
pull:
docker pull $(IMAGE_BASE)
docker pull $(IMAGE_AGENT)
clean:
docker rmi $(IMAGE_BASE)
docker rmi $(IMAGE_AGENT)

View File

@ -70,8 +70,8 @@ list:
# @ pdsh -w $(NODES) 'cat $(SHARED_DIR)/id_rsa.pub >> ${HOME}/.ssh/authorized_keys' | dshbak -c
# @ rm -f $(SHARED_DIR)/id_rsa.pub
pull-all:
@ for i in database actuator controld agent base cli; do \
pull-all: get-cli
@ for i in database actuator controld agent base; do \
echo $$i; \
docker pull hub.cstcloud.cn/scalebox/$$i; \
done