Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run openshift-template-tool as a Docker Container #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM golang:1.6
RUN mkdir /files \
&& mkdir -p $GOPATH/src/github.com/feedhenry/openshift-template-tool
WORKDIR $GOPATH/src/github.com/feedhenry/openshift-template-tool
ADD . .
RUN go install
VOLUME /files
ENTRYPOINT ["openshift-template-tool"]
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,29 @@ the metadata from the base template, the first command line argument. The lists
of objects and parameters from each of the subsequent templates are appended to
that of the base template and duplicates are removed.

## Docker

How to build a local image:
``` shell
docker build -t openshift-template-tool .
```

Then, to call the `openshift-template-tool` tool:
``` shell
alias openshift-template-tool="docker run -it --rm -v \"$PWD\":/files openshift-template-tool:latest"

openshift-template-tool <command>
```

In particular, to merge files:
``` shell
openshift-template-tool merge /files/base-template.json \
/files/component-1.json \
/files/component-2.json \
... \
> merged-template.json
```

## Verifying your changes before a commit/pull request

To ensure the tool can still be built, all tests pass and Go files are properly
Expand Down