How to pass AWS credential when building Docker image in Jenkins?

Hi I am working in jenkins to build my AWS CDK project. I have created my docker file as below.

FROM python:3.7.4-alpine3.10

RUN mkdir /cdk

COPY ./requirements.txt /cdk/
COPY ./ /usr/local/bin/
COPY ./aws /cdk/

RUN apk -uv add --no-cache groff jq less
RUN apk add --update nodejs npm
RUN apk add --update bash && rm -rf /var/cache/apk/*
RUN npm install -g aws-cdk
RUN pip3 install -r requirements.txt

RUN ls -la

RUN cdk synth
RUN cdk deploy

In jenkins I am building this Docker image as below.

 stages {
     stage('Dev Code Deploy') {
      when {
        expression {
          return BRANCH_NAME = 'Develop'
      agent {
        dockerfile {
          additionalBuildArgs "--build-arg 'http_proxy=${env.http_proxy}' --build-arg 'https_proxy=${env.https_proxy}'"
          filename 'Dockerfile'
          args '-u root:root'

In the above code I am not supplying AWS credentials So when cdk synth is executed I get error Need to perform AWS calls for account 1234567 but no credentials found. Tried: default credentials.

In jenkins I have my AWS credentials and I can access this like

 steps {
        withCredentials([[$class: 'AmazonWebServicesCredentialsBinding',credentialsId: "${env.PROJECT_ID}-aws-${env.ENVIRONMENT}"]]) {
           sh 'ls -la'
           sh "bash ./scripts/"

But how can I pass these credentialsId when building docker image. Can someone help me to figure it out. Any help would be appreciated. Thanks

Source: StackOverflow