- Target your desired region.
ibmcloud target -r us-east -g default
- Create the Code Engine project.
ibmcloud code-engine project create --name calculator
- Create a configmap for the list of data centers (json file).
ibmcloud code-engine configmap create \
--name datacenters.json \
--from-file ./data/datacenters.json
- Create the application from an existing container image, expose port 3000 and map the configmap to a volume.
ibmcloud code-engine app create -n calculator \
--image docker.io/dprosper/calculator \
--port 3000 \
--mount-configmap /data=datacenters.json
- Optional - Update configmap
ibmcloud code-engine configmap update \
--name datacenters.json \
--from-file ./data/datacenters.json
- Optional - Update the application from an existing container image, exposer port 3000 and map the configmap to a volume.
ibmcloud code-engine app update -n calculator \
--image docker.io/dprosper/calculator \
--port 3000 \
--mount-configmap /data=datacenters.json
docker build -t dprosper/ic-cidr-calculator -f ./frontend-api/Dockerfile .
docker buildx build --platform=linux/amd64 --load -t dprosper/ic-cidr-calculator -f ./frontend-api/Dockerfile .
docker buildx build --platform=linux/amd64 -t local-build --load .
docker run --rm -v $(pwd)/data:/data -v $(pwd)/networks:/networks -p 3000:3000 dprosper/ic-cidr-calculator
Submit a pull request and the code will be deployed to Code Engine to facilitate the review.