The Pega provided docker image is built on node:xx-alpine. This is a small image and excellent for purpose. Should customers wish to build an App-Static image on their own base image, that is possible by extracting the content from the Pega image, and placing it in their own image.
The App-Static service is a simple nodejs webserver built on Express. Package install is done during docker image build. Node14 and on can be used.
Here is a docker file that will build a custom image from the Pega image:
# for customers wishing to build their own App-Static image over a different base image
# customer to ensure node and npm already installed into base image# Stage 1
# Using PEGA shipped Constellation Service(C11n) docker image as base image.
# insert correct version here
ARG C11N_IMAGE_VERSION=8.8.0-ga-1
FROM pega-docker.downloads.pega.com/constellation-appstatic-service/docker-image:$C11N_IMAGE_VERSION as c11nSource# Stage 2
# Base image customization to be done here, node:18-alpine as example
FROM node:18-alpine
COPY --from=c11nSource ./usr/src/app /usr/src/app
WORKDIR /usr/src/app
# default port service is listening on
EXPOSE 3000# composer, k8s, etc adds arguements port, static root
ENTRYPOINT ["npm", "start", "root=dist"]
Here is an example of running the custom build, for the 8.7.0-ga-43 release:
docker build --build-arg C11N_IMAGE_VERSION=8.7.0-ga-43 -t custom/constellation-appstatic-service:8.7.0-ga-43 -f ./c11n-docker-image-builder .
# run new image exactly as original:
# docker run -p 3000:3000 --name constellation-service custom/constellation-appstatic-service 3000 https://1.2.3.4:80
Nodejs must be installed