I am a bit confused how to run docker commands in CircleCI. What is the best way to do that?
I have created my custom docker image, very simple indeed, consisting aws-cli and potentially some tools. Nothing fancy. I’m willing to use it in my CircleCI flow:
deploy-staging-se: docker: - image: xxxxxxx/aws-ecs:0.1 steps: - checkout - setup_remote_docker: docker_layer_caching: true - run: name: Docker test command: docker version - run: name: aws cli test command: aws help
This however will not know what docker is in
docker version command even though I’ve used
setup_remote_docker. As far as I understand all docker commands will run on primary image so on my
xxxxxxx/aws-ecs:0.1 but all the jobs related to those task will be executed in remote docker environment, correct? If I would like to use docker commands shall inside my container should I install docker on my custom image? Docker in docker, sounds weird 😉 Or it there another way to run docker commands having primary custom image without docker installed?
Source: Docker Questions