Automating login and logout

The following example demonstrates adding a couple of new tasks called login and logout, which will perform these actions using the Docker client:

.PHONY: test release clean version login logoutexport APP_VERSION ?= $(shell git rev-parse --short HEAD)version:  @ echo '{"Version": "$(APP_VERSION)"}'login:    $$(aws ecr get-login --no-include-email)logout:    docker logout https://385605022855.dkr.ecr.us-east-1.amazonaws.comtest:    docker-compose build --pull release    docker-compose build    docker-compose run testrelease:    docker-compose up --abort-on-container-exit migrate    docker-compose run app python3 manage.py collectstatic --no-input    docker-compose up --abort-on-container-exit acceptance @ echo App running at http://$$(docker-compose ...

Get Docker on Amazon Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.