I use Gitlab CI to deploy to AWS ECS. As such, I need two things from the Gitlab environment:
- Docker-in-Docker - so I can run docker build etc
- AWS CLI - to deploy to ECS with the AWS CLI
This is a snippet of my stage in Gitlab CI. Although the AWS CLI bit doesn't make sense, it is enough to demonstrate the problem I am facing:
dockerise-dev:
stage: build
image: docker:20.10.12
services:
- name: docker:20.10.12-dind
- name: amazon/aws-cli:2.15.26
entrypoint: [""]
script:
- docker build .
- aws s3 ls
But I get the error below:
ERROR: Preparation failed: Error response from daemon: no command specified (docker.go:436:0s)
How do i make use of the amazon/aws-cli:2.15.26 as a service so I don't have to install aws cli separately?
Thanks