I have a problem with deploying docker image to the AWS LightSail. I'm using private containers on GitLab and my images are pushing there after build. I create second stage for ci/cd for deploying image to lightsail.
image: docker:19.03.12
services:
- docker:19.03.12-dind
build:
stage: build
before_script:
- docker login registry.gitlab.com --username $UserName -p $CiCdToken
script:
- docker build -t registry.gitlab.com/nickname/testprojectname .
- docker push registry.gitlab.com/nickname/testprojectname
deploy:
stage: deploy
image: python:latest
script:
- pip install awscli
- pip install lightsailctl
- aws lightsail push-container-image --service-name testprojectname --label testprojectname --image registry.gitlab.com/nickname/testprojectname
Unfortunately python does not have lightsailctl and awscli doesn't support lightsail.
- I dont know how to push builded container from private containers on gitlab to the
lightsail - I dont know how to pass credentials to
aws ctlvia runner.
Best, Marcin Włoch