title: Docker: ERROR: Job failed: command terminated with exit code 1
body: <p>I am trying to copy all the files from a folder into a folder within a docker image as it's being built. Here is my error from my gitlab pipeline when it tries to build the docker image.</p>
  <pre><code>Status: Downloaded newer image for nginx:1.18.0-alpine
   ---&gt; 8c1bfa967ebf
  Step 2/3 : COPY conf/default.conf /etc/nginx/conf.d/default.conf
  COPY failed: Forbidden path outside the build context: ../../src/ ()
   ---&gt; ffbb72db6c26
  Step 3/3 : COPY ../../src/ /var/www/html/public
  ERROR: Job failed: command terminated with exit code 1
  </code></pre>
  <p><a href="https://i.stack.imgur.com/usWXD.png" rel="nofollow noreferrer">Here is the dockerfile + folder structure</a></p>
  <p>My gitlab-ci.yml file:</p>
  <pre><code>image: docker:stable
  
  services:
  - docker:18-dind
  variables:
    DOCKER_HOST: tcp://localhost:2375
  
  php:
  
    before_script:
      - docker login gitlab.domain.com:5050 -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}
    script:
      - docker build -t gitlab.domain.com:5050/project/php:7.2-fpm ./php-fpm
      - docker push gitlab.domain.com:5050/project/php:7.2-fpm
  
  nginx:
  
    before_script:
      - docker login gitlab.domain.com:5050 -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}
    script:
      - docker build -t gitlab.domain.com:5050/project/nginx:stable ./nginx
      - docker push gitlab.domain.com:5050/project/nginx:stable
  </code></pre>