Created script for building Docker image used with visio stencils, updating usage of Docker related Docker image
This commit is contained in:
parent
72c7370548
commit
7328886177
|
@ -26,6 +26,8 @@ This script will convert all svg into png. It's based on a docker container defi
|
|||
|
||||
This script will convert png icons into Visio stencil using project from [here](https://github.com/hoveytechllc/visio-stencil-creator)
|
||||
|
||||
A Docker image hosted on GCR (`k8s.gcr.io/visio-stencil-creator`), is used to generate the Visio stencil file. The script [./tools/build-visio-stencil-creator.sh](./tools/build-visio-stencil-creator.sh) can be used to update the Docker image if it needs to be built.
|
||||
|
||||
## How to use these icons
|
||||
|
||||
Each icon can be found in differents formats
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
GITHUB_ORG="hoveytechllc"
|
||||
REPO_NAME="visio-stencil-creator"
|
||||
TAG_NAME="v1.0"
|
||||
|
||||
GCR_REPO="hoveytech/${REPO_NAME}:${TAG_NAME}"
|
||||
|
||||
rm -fdr ./tools/${REPO_NAME}
|
||||
|
||||
# Clone repository in current path
|
||||
git clone --branch release/${TAG_NAME} https://github.com/${GITHUB_ORG}/${REPO_NAME}.git ./tools/${REPO_NAME}
|
||||
|
||||
# build image using Dockerfile from github repository
|
||||
# Tag resulting image for pushing to k8s.gcr.io
|
||||
docker build \
|
||||
-t ${GCR_REPO} \
|
||||
-f ./tools/${REPO_NAME}/Dockerfile \
|
||||
./tools/${REPO_NAME}
|
||||
|
||||
# Clean up source code
|
||||
rm -fdr ./tools/${REPO_NAME}
|
||||
|
||||
docker push ${GCR_REPO}
|
|
@ -1,27 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
ICONS_PATH=${PWD}
|
||||
DOCKER_IMAGE_REPO="k8s.gcr.io/visio-stencil-creator:v1.0"
|
||||
|
||||
GITHUB_ORG="hoveytechllc"
|
||||
REPO_NAME="visio-stencil-creator"
|
||||
|
||||
rm -fdr ./tools/${REPO_NAME}
|
||||
|
||||
# Clone repository in current path
|
||||
git clone https://github.com/${GITHUB_ORG}/${REPO_NAME}.git ./tools/${REPO_NAME}
|
||||
|
||||
# build image using Dockerfile from github repository
|
||||
docker build \
|
||||
-t ${REPO_NAME}:latest \
|
||||
-f ./tools/${REPO_NAME}/Dockerfile \
|
||||
./tools/${REPO_NAME}
|
||||
|
||||
# Run newly created Docker image
|
||||
# Run docker image that generates Visio stencil
|
||||
# using png images.
|
||||
docker run \
|
||||
-v ${ICONS_PATH}:/app/content \
|
||||
${REPO_NAME}:latest \
|
||||
${DOCKER_IMAGE_REPO} \
|
||||
"--image-pattern=**/labeled/*-256.png" \
|
||||
"--image-path=/app/content/png" \
|
||||
"--output-filename=/app/content/visio/kubernetes-visio-stencil.vssx"
|
||||
|
||||
rm -fdr ./tools/${REPO_NAME}
|
Loading…
Reference in New Issue