pass a secret string into a file via ecs

I’m trying to run ECS cluster with a task that runs a socat command.
My socat command requires ca file in a pem file only.
I copid the context of the pem file to the secret manager as a secret text.
I’m trying to pass the secret value (a list of CERTIFICATEs) into a pem file.

my Dockerfile looks like this:

FROM ubuntu:18.04
RUN apt-get update && apt-get install -y socat
ARG CA_BUNDLE
ENV CA_BUNDLE ${CA_BUNDLE}
RUN echo ${CA_BUNDLE} > ca-bundle.pem

MY task defention looks like this:
my task defention

I keep seeing in cloudwatch logs:

socat[142] E SSL_CTX_load_verify_locations(): error:0B084088:x509 certificate routines:X509_load_cert_crl_file:no certificate or crl found

What am I missing? Is something wrong with my Dockerfile? Am I not passing the Env Var correctly?

Source: Dockerfile Questions

LEAVE A COMMENT