title: gitlab-runner - deploy docker image to a server
body: <p>I can setup a gitlab-runner with docker image as below:-</p>
  
  <pre><code>stages:
    - build
    - test
    - deploy
  
  image: laravel/laravel:v1
  
  build:
    stage: build
    script: 
      - npm install
      - composer install
      - cp .env.example .env
      - php artisan key:generate
      - php artisan storage:link
  
  test:
    stage: test
    script: echo "Running tests"    
  
  deploy_staging:
    stage: deploy
    script:
      - echo "What shall I do?"
    environment:
      name: staging
      url: https://staging.example.com
    only:
    - master
  </code></pre>
  
  <p>It can pass the build stage and test stage, and I believe a docker image/container is ready for deployment. From Google, I observe it may use "docker push" to proceed next step, such as push to AWS ECS, or somewhere of Gitlab. Actually I wish to understand, if I can push it directly to another remote server (e.g. by scp)?</p>