title: Specify cert to use for SSL in docker-compose.yml file?
body: <p>I've got a small <code>docker-compose.yaml</code> file that looks like this (it's used to fire up a local test-environment):</p>
  
  <pre><code>version: '2'
  
  services:
      ubuntu:
          build:
              context: ./build
              dockerfile: ubuntu.dock
          volumes:
              - ./transfer:/home/
          ports:
              - "60000:22"
      python:
          build:
              context: ./build
              dockerfile: python.dock
          volumes:
              - .:/home/code
          links:
              - mssql
              - ubuntu
      mssql:
        image: "microsoft/mssql-server-linux"
        environment:
            SA_PASSWORD: "somepassword"
            ACCEPT_EULA: "Y"
        ports:
            - "1433:1433"
  </code></pre>
  
  <p>The issue that I run into is that when I run <code>docker-compose up</code> it fails at this step (which is in the <code>python.dock</code> file):</p>
  
  <pre><code>Step 10/19 : RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
   ---&gt; Running in e4963c91a05b
  </code></pre>
  
  <p>The error looks like this:</p>
  
  <pre><code>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
  More details here: http://curl.haxx.se/docs/sslcerts.html
  </code></pre>
  
  <p>The part where it fails in the <code>python.dock</code> file looks like this:</p>
  
  <pre><code># This line fails
  RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
  RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list &gt; /etc/apt/sources.list.d/mssql-release.list
  RUN apt-get update -y
  </code></pre>
  
  <p>I've had issues with curl / docker in the past - because we use a self-signed cert for decrypting/encrypting at the firewall level (network requirement); is there a way for me to specify a self-signed cert for the containers to use?</p>
  
  <p>That would allow curl to reach out and download the required files. </p>
  
  <p>I've tried running something like <code>docker-compose -f docker-compose.yaml --tlscert ~/certs/the-self-signed-ca.pem up</code> but it fails.</p>
  
  <p>How can I do this a bit more programatically so I can just run <code>docker-compose up</code> ?</p>