Build application using below command
mvn clean install
or
./mvnw clean install
Build application using below command
gradle clean build
or
./gradlew clean build
export TODO_APP_VERSION=<version>
docker pull ghcr.io/raghav2211/spring-web-flux-todo-app/todo:${TODO_APP_VERSION}
or
docker build --build-arg JAR_FILE=target/todo-${TODO_APP_VERSION}.jar --tag todo:${TODO_APP_VERSION} .
If you use Gradle, you can run it with the following command
docker build --build-arg JAR_FILE=build/libs/todo-${TODO_APP_VERSION}.jar --tag todo:${TODO_APP_VERSION} .
$ export AWS_REGION=<aws.region>
$ export AWS_ACCOUNT_ID=<aws.account.id>
# create if not exists
$ aws ecr create-repository --repository-name todo
$ aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com
$ docker tag todo:${TODO_APP_VERSION} ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/todo:${TODO_APP_VERSION}
$ docker push ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/todo:${TODO_APP_VERSION}