The code functions well elsewhere and on the local system, so it is a permissions issue. The permission denied error is logged in the location where the binary is intended to be utilised after deployment using EKS in AWS.
Node.js
const exec = require("child_process").exec;
exec(`./binaryName -i ${file_name} -o ${file_name}`, (error, stdout, stderr) => {
if (error) {
... //redacted for irrelevance
The dockerfile
FROM node:14
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
RUN addgroup --group dockergroup \
&& adduser \
"dockeruser"
RUN chown dockeruser:dockergroup /usr/src/app /tmp
USER dockeruser:dockergroup
# Bundle app source
COPY . .
EXPOSE 8080
CMD [ "node", "index.js" ]
The user group component was added after reviewing several threads on stackoverflow; otherwise, the code functions properly. However, the permission denied error continues to appear.