update for app hello-world.
This commit is contained in:
parent
8ecab85d1f
commit
ed6228b77f
|
@ -13,7 +13,7 @@ if [ -e /work/.scalebox/cluster_data.txt ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cluster=$SOURCE_CLUSTER
|
cluster=$SOURCE_CLUSTER
|
||||||
[ "$cluster" == "" ] && cluster=$CLUSTER_NAME
|
[ "$cluster" == "" ] && cluster=$CLUSTER
|
||||||
|
|
||||||
v=${cluster_map[$cluster]}
|
v=${cluster_map[$cluster]}
|
||||||
if [ "$v" == "" ]; then
|
if [ "$v" == "" ]; then
|
||||||
|
|
|
@ -50,7 +50,7 @@ else
|
||||||
rsync_args=""
|
rsync_args=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cluster=$CLUSTER_NAME
|
cluster=$CLUSTER
|
||||||
v=${cluster_map[$cluster]}
|
v=${cluster_map[$cluster]}
|
||||||
if [ "$v" == "" ]; then
|
if [ "$v" == "" ]; then
|
||||||
v=$(scalebox cluster get-parameter --cluster $cluster rsync_info)
|
v=$(scalebox cluster get-parameter --cluster $cluster rsync_info)
|
||||||
|
|
|
@ -10,6 +10,16 @@ RUN echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list
|
||||||
&& apt-get autoremove -y \
|
&& apt-get autoremove -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
# jq for json parsing in bash
|
||||||
|
RUN rm -f /etc/apt/apt.conf.d/docker-clean; \
|
||||||
|
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
|
||||||
|
RUN --mount=type=cache,target=/var/cache/apt \
|
||||||
|
--mount=type=cache,target=/var/lib/apt \
|
||||||
|
apt update \
|
||||||
|
&& apt-get install -y jq \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
COPY --from=hub.cstcloud.cn/scalebox/actuator /root/.ssh /root/.ssh
|
COPY --from=hub.cstcloud.cn/scalebox/actuator /root/.ssh /root/.ssh
|
||||||
# COPY --from=hub.cstcloud.cn/scalebox/dir-list /usr/local/bin/* /usr/local/bin/
|
# COPY --from=hub.cstcloud.cn/scalebox/dir-list /usr/local/bin/* /usr/local/bin/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
IMAGE_NAME:=hub.cstcloud.cn/scalebox/rsync-copy
|
IMAGE_NAME:=hub.cstcloud.cn/scalebox/rsync-copy
|
||||||
|
|
||||||
build:
|
build:
|
||||||
docker build --network=host -t $(IMAGE_NAME) .
|
DOCKER_BUILDKIT=1 docker build --network=host -t $(IMAGE_NAME) .
|
||||||
|
|
||||||
push:
|
push:
|
||||||
docker push $(IMAGE_NAME)
|
docker push $(IMAGE_NAME)
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
FROM hub.cstcloud.cn/scalebox/agent
|
|
||||||
|
|
||||||
LABEL maintainer="kaichao"
|
|
||||||
|
|
||||||
COPY run.sh /app/bin/
|
|
|
@ -1,13 +0,0 @@
|
||||||
IMAGE_NAME:=hub.cstcloud.cn/scalebox/hello-scalebox
|
|
||||||
|
|
||||||
build:
|
|
||||||
docker build --network=host -t $(IMAGE_NAME) .
|
|
||||||
|
|
||||||
push:
|
|
||||||
docker push $(IMAGE_NAME)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
docker rmi $(IMAGE_NAME)
|
|
||||||
|
|
||||||
run:
|
|
||||||
scalebox app create
|
|
|
@ -5,7 +5,7 @@ parameters:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
hello-scalebox:
|
hello-scalebox:
|
||||||
base_image: hub.cstcloud.cn/scalebox/hello-scalebox
|
base_image: hub.cstcloud.cn/scalebox/agent:latest
|
||||||
variables:
|
variables:
|
||||||
code_path: ${PWD}/code
|
code_path: ${PWD}/code
|
||||||
parameters:
|
parameters:
|
||||||
|
|
|
@ -72,14 +72,14 @@ list:
|
||||||
# @ rm -f $(SHARED_DIR)/id_rsa.pub
|
# @ rm -f $(SHARED_DIR)/id_rsa.pub
|
||||||
|
|
||||||
pull-all:
|
pull-all:
|
||||||
@ for i in database actuator controld agent base; do \
|
@ for i in database actuator controld agent; do \
|
||||||
echo $$i; \
|
echo $$i; \
|
||||||
docker pull hub.cstcloud.cn/scalebox/$$i; \
|
docker pull hub.cstcloud.cn/scalebox/$$i; \
|
||||||
done
|
done
|
||||||
|
|
||||||
get-cli:
|
get-cli:
|
||||||
@ mkdir -p ~/bin
|
@ mkdir -p ~/bin
|
||||||
# @ docker pull hub.cstcloud.cn/scalebox/cli
|
@ docker pull hub.cstcloud.cn/scalebox/cli
|
||||||
@ os=`uname| tr '[:upper:]' '[:lower:]'` \
|
@ os=`uname| tr '[:upper:]' '[:lower:]'` \
|
||||||
&& arch=`uname -m` \
|
&& arch=`uname -m` \
|
||||||
&& if [ "$$arch" = "x86_64" ]; then arch="amd64"; fi \
|
&& if [ "$$arch" = "x86_64" ]; then arch="amd64"; fi \
|
||||||
|
|
Loading…
Reference in New Issue