Docker Commands (Login, Build, Push) on Docker executor type

2.0

#1

Hi, I’ve tried searching for the forums but haven’t seen any way to do this.

I’m using the Docker executor type to use a node image.
I’m running my tests and now I want to build an image with the code and push it somewhere.

Is there anyway to do this without having to install docker and run it on the base docker image?

Using:

docker:
    - image: node

I want to be able to do:

  - run:
      name: docker login
      command: docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" quay.io

And eventually a docker build -t blah:blah .


#2

Finally found it after about 25 threads:


#3