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
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.
additional to Hieu Vo
image: docker:latest
stages:
- build
- release
services:
- docker:dind
you need to choose an image including docker binaries
image: gitlab/dind
services:
- docker:dind