Gitlab CI - docker: command not found

后端 未结 3 1567
太阳男子
太阳男子 2021-01-11 09:23

I am trying to build my docker image within the gitlab ci pipeline.

However it is not able to find the docker command.

/bin/bash: line 69: doc

3条回答
  •  一整个雨季
    2021-01-11 09:55

    Problem here is that node docker image does not embed docker binaries.

    Two possibilities :

    • split stages to two jobs. One using node images for quality and test, one using docker image for building and deploying. See jobs documentation.

    • build a custom docker image that embed both node and docker and use this image to build your repo.

    Note that in both case you will have to enable docker inside your agent. See documentation.

提交回复
热议问题