-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating Exteding Docker with PVC case (#862)
- Loading branch information
1 parent
fb3b841
commit 2075545
Showing
4 changed files
with
120 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM unskript/awesome-runbooks:latest as base | ||
RUN mkdir -p /data | ||
RUN mkdir -p /unskript | ||
ADD custom /data/custom | ||
COPY custom/actions /unskript/data | ||
COPY custom/runbooks /unskript/data | ||
|
||
CMD ["./start.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# Copyright (c) 2023 unSkript.com | ||
# All rights reserved. | ||
# | ||
# This program is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
# FOR A PARTICULAR PURPOSE | ||
# | ||
# | ||
.PHONY: bulid | ||
|
||
# ACTIONS DIRECTORY | ||
ACTION_DIRECTORY = actions | ||
|
||
# RUNBOOKS DIRECTORY | ||
RUNBOOK_DIRECTORY = runbooks | ||
|
||
# RUNBOOKS DIRECTORY | ||
AWESOME_DIRECTORY = Awesome-CloudOps-Automation | ||
|
||
# CUSTOM DIRECTORY | ||
CUSTOM_DIRECTORY = custom | ||
|
||
# Set Default values | ||
CUSTOM_DOCKER_NAME ?= my-awesome-docker | ||
CUSTOM_DOCKER_VERSION ?= 0.1.0 | ||
|
||
pre-build: | ||
@echo "Preparing To create custom Docker build" | ||
if [ ! -d "$(ACTION_DIRECTORY)" ]; then\ | ||
echo "Actions Directory does not exist, It is needed to build the custom docker image"; \ | ||
exit 1; \ | ||
fi | ||
if [ ! -d "$(RUNBOOK_DIRECTORY)" ]; then\ | ||
echo "Runbooks Directory does not exist, It is needed to build the custom docker image"; \ | ||
exit 1; \ | ||
fi | ||
if [ ! -d "$(AWESOME_DIRECTORY)" ]; then\ | ||
echo "Awesome-CloudOps-Automation Directory does not exist, It is needed to build the custom docker image"; \ | ||
exit 1; \ | ||
fi | ||
@echo "Verified all pre-requisites are met, proceeding to build custom docker image" | ||
@mkdir -p $(CUSTOM_DIRECTORY) | ||
@cp -Rf $(ACTION_DIRECTORY) $(CUSTOM_DIRECTORY)/actions | ||
@cp -Rf $(RUNBOOK_DIRECTORY) $(CUSTOM_DIRECTORY)/runbooks | ||
@cp $(AWESOME_DIRECTORY)/build/templates/Dockerfile.template Dockerfile | ||
|
||
|
||
build: pre-build | ||
@echo "Using \n Custom Docker Name: $(CUSTOM_DOCKER_NAME) Custom Docker Version: $(CUSTOM_DOCKER_VERSION)" | ||
@docker build -t $(CUSTOM_DOCKER_NAME):$(CUSTOM_DOCKER_VERSION) -f Dockerfile . |