title: Copy S3 File to Docker Image via Dockerfile
body: <p>I have a Dockerfile that installs awscli and then tries to run aws s3 cp to get a file and put it on the docker image.</p>
  
  <p>My dockerfile is:</p>
  
  <pre><code>FROM my-kie-server:latest
  
  USER root
  RUN echo "ip_resolve=4" &gt;&gt; /etc/yum.conf
  
  ENV http_proxy host.docker.internal:9000
  ENV https_proxy host.docker.internal:9000
  ENV HTTP_PROXY host.docker.internal:9000
  ENV HTTPS_PROXY host.docker.internal:9000
  
  RUN yum install -y maven
  RUN yum install -y awscli
  
  USER jboss
  
  ARG AWS_ACCESS_KEY_ID
  ARG AWS_SECRET_ACCESS_KEY
  
  RUN aws s3 cp s3://myBucket/myPath/myFile.jar x.jar
  </code></pre>
  
  <p>But when I build the image I get this error:</p>
  
  <blockquote>
    <p>fatal error: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:618)
    The command '/bin/sh -c aws s3 cp s3://myBucket/myPath/myFile.jar x.jar' returned a non-zero code: 1</p>
  </blockquote>
  
  <p>I have tried using --no-verify-ssl on the aws s3 cp command but get the same error.</p>
  
  <p>I've found very little online that mentions this UNKNOWN_PROTOCOL error. Any advice appreciated, thanks.</p>