create docker image for acme-certbot
This commit is contained in:
0
dockerfiles/tasks/acme-certbot/cli/.bash_cli
Normal file
0
dockerfiles/tasks/acme-certbot/cli/.bash_cli
Normal file
47
dockerfiles/tasks/acme-certbot/cli/build
Executable file
47
dockerfiles/tasks/acme-certbot/cli/build
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
LOCAL_IMAGE=xaicorp/acme-certbot
|
||||
TAG=latest
|
||||
REMOTE_IMAGE=dkregistry.xai-corp.net:5000/${LOCAL_IMAGE}:${TAG}
|
||||
|
||||
build() {
|
||||
docker build --rm -f Dockerfile -t ${LOCAL_IMAGE} .
|
||||
}
|
||||
|
||||
build_test() {
|
||||
echo testing the image
|
||||
docker run --rm $LOCAL_IMAGE --version | grep 'certbot 0.40'
|
||||
}
|
||||
|
||||
build_deploy() {
|
||||
echo push to registry
|
||||
|
||||
docker tag $LOCAL_IMAGE $REMOTE_IMAGE
|
||||
docker push $REMOTE_IMAGE
|
||||
}
|
||||
|
||||
print_usage() {
|
||||
printf "Usage: %s: [-b] [-t] [-d] \n" "$0"
|
||||
echo -b build
|
||||
echo -t test
|
||||
echo -d push to registry
|
||||
echo -h help
|
||||
exit 0
|
||||
}
|
||||
|
||||
######
|
||||
if [ -z "$1" ]; then
|
||||
build && build_test && build_deploy
|
||||
exit
|
||||
fi
|
||||
|
||||
while getopts btdh name
|
||||
do
|
||||
case $name in
|
||||
b) build;;
|
||||
t) build_test;;
|
||||
d) build_deploy;;
|
||||
*) print_usage;;
|
||||
esac
|
||||
done
|
||||
3
dockerfiles/tasks/acme-certbot/cli/build.help
Normal file
3
dockerfiles/tasks/acme-certbot/cli/build.help
Normal file
@@ -0,0 +1,3 @@
|
||||
ARGS - The arguments you wish to provide to this command
|
||||
|
||||
TODO: Fill out the help information for this command.
|
||||
1
dockerfiles/tasks/acme-certbot/cli/build.usage
Normal file
1
dockerfiles/tasks/acme-certbot/cli/build.usage
Normal file
@@ -0,0 +1 @@
|
||||
ARGS...
|
||||
4
dockerfiles/tasks/acme-certbot/cli/update-scripts
Executable file
4
dockerfiles/tasks/acme-certbot/cli/update-scripts
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
echo -e "\033[36mTODO\033[39m: Implement this command"
|
||||
|
||||
|
||||
3
dockerfiles/tasks/acme-certbot/cli/update-scripts.help
Normal file
3
dockerfiles/tasks/acme-certbot/cli/update-scripts.help
Normal file
@@ -0,0 +1,3 @@
|
||||
ARGS - The arguments you wish to provide to this command
|
||||
|
||||
TODO: Fill out the help information for this command.
|
||||
1
dockerfiles/tasks/acme-certbot/cli/update-scripts.usage
Normal file
1
dockerfiles/tasks/acme-certbot/cli/update-scripts.usage
Normal file
@@ -0,0 +1 @@
|
||||
ARGS...
|
||||
Reference in New Issue
Block a user