I'm using elastic-beanstalk to deploy multiple docker containers. I have travisCI configured to watch for changes to the master branch of my code repository, rebuild the docker images, push the new images to Docker hub, and then redeploy with elastic-beanstalk. The issue is that the elastic-beanstalk instance continues to show an older version of the image after the redeployment.
My .travis.yml file:
sudo: required
services:
- docker
cache: false
before_install:
- docker build -t [image-tag-1] -f ./client/dev.Dockerfile ./client
script:
- node ./testTest.js
after_success:
- docker build -t [image-tag-1]-client ./client
- docker build -t [image-tag-2]-nginx ./nginx
- docker build -t [image-tag-3] ./server
# Log into the docker CLI
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
# Take those images and push them to docker hub
- docker push [image-tag-1]
- docker push [image-tag-2]
- docker push [image-tag-3]
deploy:
provider: elasticbeanstalk
region: us-west-2
app: xxxx-v7
env: xxxxx-env
bucket_name: elasticbeanstalk-us-west-2-xxxx
bucket_path: docker-xxxx
on:
branch: master
access_key_id:
secure: $AWS_ACCESS_KEY
secret_access_key:
secure: $AWS_SECRET_KEY
After pushing changes to the master branch, travis successfully rebuilds and pushes the images, and elastic-beanstalk successfully redeploys. But the content of the elastic-beanstalk site shows that the old docker image is still being used. How can I get elastic-beanstalk to actually pull the new images during the redeployment?