Skip to main content

Application Runtime

Here you can see a matrix that describes the different application runtimes the Initium CLI is currently compatible with. For each one of them, a different Dockerfile template is being used, in order to provide an easy way to build and deploy the application to a Kubernetes cluster. Distroless base images help building & using lightweight Docker images.

Application RuntimesSupported
Nodejs
GoLang
PythonComing Soon
More will be added...

Node

This is a Dockerfile example for the Node images the CLI deploys:

FROM node:{{ or .RuntimeVersion .DefaultRuntimeVersion }} AS build-env

WORKDIR /app

COPY package*.json tsconfig*.json ./

RUN {{ .NodeInstallCommand }}

COPY . /app

RUN npm run build --if-present
RUN npm test

FROM gcr.io/distroless/nodejs20-debian11
COPY --from=build-env /app /app
WORKDIR /app
CMD ["index.js"]

Go

This is a Dockerfile example for the Golang images the CLI deploys:

FROM golang:{{ or .RuntimeVersion .DefaultRuntimeVersion }} as build

WORKDIR /go/src/app
COPY . .

RUN go mod download
RUN go vet -v ./...
RUN go test -v ./...

RUN CGO_ENABLED=0 go build -o /go/bin/app

FROM gcr.io/distroless/static-debian11

COPY --from=build /go/bin/app /
ENTRYPOINT ["/app"]