Search code examples
dockergitlab

Docker run in gitlab-ci


This is my gitlab-ci.yml:

codescan:
 image: docker:latest
 stage: deploy
 script:
  - "docker run 192.168.17.5:5200/codescan:latest /start.sh"

The start.sh is now just a echo-command for testing purposes.

But in the Gitlab log I can't see the echo:

enter image description here


Solution

  • You can directly use codescan:latest image like below:

    codescan:
     image: 192.168.17.5:5200/codescan:latest
     stage: deploy
     script:
      - /start.sh