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 EDGE_SERVICE_VERSION=<version>
docker pull ghcr.io/raghav2211/spring-web-flux-todo-app/edge-service:${EDGE_SERVICE_VERSION}
or
docker build --build-arg JAR_FILE=target/edge-service-${EDGE_SERVICE_VERSION}.jar --tag edge-service:${EDGE_SERVICE_VERSION} .
If you use Gradle, you can run it with the following command
docker build --build-arg JAR_FILE=build/libs/edge-service-${EDGE_SERVICE_VERSION}.jar --tag edge-service:${EDGE_SERVICE_VERSION} .
$ export AWS_REGION=<aws.region>
$ export AWS_ACCOUNT_ID=<aws.account.id>
# create if not exists
$ aws ecr create-repository --repository-name edge-service
$ 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 edge-service:${EDGE_SERVICE_VERSION} ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/edge-service:${EDGE_SERVICE_VERSION}
$ docker push ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/edge-service:${EDGE_SERVICE_VERSION}