Skip to content

Commit

Permalink
US-620855 Add detemplatize executable using multi stage docker build (#…
Browse files Browse the repository at this point in the history
…217)

* detemplatize library included

* removed instructions to copy the detemplatize executable.

* Reverted removal and re-added Dockerfile location and note.

* Removed explicit latest tag for detemplatize image
  • Loading branch information
akshithac-21 authored Jul 1, 2024
1 parent 17b8fda commit b323f5e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Dockerfile for Pega 8 Platform

# Base image to extend from

ARG BASE_TOMCAT_IMAGE

FROM pegasystems/detemplatize as detemplatize

FROM $BASE_TOMCAT_IMAGE as release

ARG VERSION
Expand All @@ -18,6 +20,8 @@ RUN groupadd -g 9001 pegauser && \


ENV PEGA_DOCKER_VERSION=${VERSION:-CUSTOM_BUILD}
# Copy detemplatize to base image bin directory
COPY --from=detemplatize /bin/detemplatize /bin/detemplatize

COPY hashes/ /hashes/
COPY keys/ /keys/
Expand Down
21 changes: 3 additions & 18 deletions docs/Building-Image-With-Own-OS-And-JDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,9 @@ Prerequisites:
Pega provides a pega-web-ready Docker image using Tomcat 9 and JDK 11 as a base image. For more information about the pega-web-ready Docker image, see `pegasystems/docker-pega-web-ready`
To build a custom pega-web-ready image using your preferred OS and JDK, perform the following actions:

1. Create a Dockerfile for your custom pega-web-ready image using your base image.

a. Use multi-stage Docker build at the beginning of your Dockerfile to copy the detemplatize executive file from the `pegasystems/detemplatize` Docker image to your base image.
The detemplatize executive file replaces template variables with actual values in the Pega Platform code.

For example:
```Dockerfile
FROM pegasystems/detemplatize AS builder
# Base Image to be used to build pega-ready image
FROM <BASE_IMAGE>
# Copy detemplatize to base image bin directory
COPY --from=builder /bin/detemplatize /bin/detemplatize
```

b. Use the open-source pega-web-ready Dockerfile code to complete the Dockerfile.
For more information, see pegasystems/docker-pega-web-ready/Dockerfile.
Note: You can add any extra environment variables needed in the Dockerfile as per your use-case.

1. Create a Dockerfile for your custom pega-web-ready image using your base image and the open-source pega-web-ready Dockerfile code.
For more information, see pegasystems/docker-pega-web-ready/Dockerfile.
Note: You can add any extra environment variables needed in the Dockerfile as per your use-case.

2. Use the following command to build the custom pega-web-ready image using the base image as an argument.
```bash
Expand Down

0 comments on commit b323f5e

Please sign in to comment.