mirror of
https://github.com/outbackdingo/ack-image-builder.git
synced 2026-01-27 10:18:13 +00:00
build/build.sh: support different template json file
Signed-off-by: Yilong Ren <yilong.ryl@alibaba-inc.com>
This commit is contained in:
@@ -2,7 +2,6 @@ FROM alpine:3.10
|
||||
|
||||
ADD https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip /packer_1.6.0_linux_amd64.zip
|
||||
RUN unzip packer_1.6.0_linux_amd64.zip && mv packer /bin/packer
|
||||
COPY examples/ack-kubernetes.json examples/ack-kubernetes.json
|
||||
COPY scripts/init.sh scripts/init.sh
|
||||
|
||||
ENTRYPOINT ["packer", "build"]
|
||||
ENTRYPOINT ["packer", "build"]
|
||||
|
||||
@@ -17,6 +17,9 @@ kube_version=${KUBE_VERSION}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
file_path="$(pwd)/$1"
|
||||
|
||||
##build OS image
|
||||
docker run -e ALICLOUD_ACCESS_KEY=$ACCESS_KEY -e ALICLOUD_SECRET_KEY=$SECRET_KEY -e REGION=$REGION -e KUBE_VERSION=$KUBE_VERSION \
|
||||
-e DOCKER_VERSION=$DOCKER_VERSION registry.aliyuncs.com/acs/ack-image-builder:v1.0.0 $1
|
||||
-e DOCKER_VERSION=$DOCKER_VERSION -v $file_path:$file_path registry.aliyuncs.com/acs/ack-image-builder:v1.0.0 $file_path
|
||||
|
||||
Reference in New Issue
Block a user