I was following a guide from AWS to build an OCPP-compliant (i.e. https://aws.amazon.com/blogs/iot/building-an-ocpp-compliant-electric-vehicle-charge-point-operator-solution-using-aws-iot-core/) However I received a error after I tried to deploy it.
[100%] fail: docker build --tag cdkasset-314a3772480da28ff3459c9bb85ba3b961ee3c0c1337cd23567bff49824e4377 --platform linux/arm64 . exited with error code 1: #0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 487B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/amazonlinux:2022
#3 DONE 1.5s
#4 [1/9] FROM docker.io/library/amazonlinux:2022@sha256:52a0dc20e07b3a70a9aca4b8f3690ab3383819c1e0ec0508e7f5a18279bc0873
#4 CACHED
#5 [internal] load build context
#5 transferring context: 159B done
#5 DONE 0.0s
#6 [2/9] RUN yum update -y
#6 0.388 exec /bin/sh: exec format error
#6 ERROR: process "/bin/sh -c yum update -y" did not complete successfully: exit code: 1
------
> [2/9] RUN yum update -y:
0.388 exec /bin/sh: exec format error
------
Dockerfile:3
--------------------
1 | FROM amazonlinux:2022
2 |
3 | >>> RUN yum update -y
4 | RUN yum groupinstall "Development Tools" -y
5 | RUN yum install openssl-libs -y
--------------------
ERROR: failed to solve: process "/bin/sh -c yum update -y" did not complete successfully: exit code: 1
❌ Building assets failed: Error: Building Assets Failed: Error: Failed to build one or more assets. See the error messages above for more information.
at buildAllStackAssets (/home/bruce/aws-ocpp-gateway/node_modules/aws-cdk/lib/index.js:383:115268)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async CdkToolkit.deploy (/home/bruce/aws-ocpp-gateway/node_modules/aws-cdk/lib/index.js:383:143802)
at async exec4 (/home/bruce/aws-ocpp-gateway/node_modules/aws-cdk/lib/index.js:438:51984)
Building Assets Failed: Error: Failed to build one or more assets. See the error messages above for more information.
I am not very experienced (basically new) to the field and I was just purely following the tutorial. I am guessing it is because I do not have YUM installed in my Ubuntu. I did some research and found out it is no longer supported and I could not get it installed. I am not sure how to solve the problem. I would appreciate any help, thanks!