Ensure you have the following installed:
- Maven
- Docker
Navigate to the target folder where your project is located. ```bash cd Accounts ```
Use the following Maven command to clean the project and build the jar file: ```bash mvn clean install ```
Compile your application and build the Docker image using Jib: ```bash mvn compile jib:dockerBuild ```
To run your Docker container and map the ports: ```bash docker run -p 8080:8080 thrilokh/accounts:v1 ```
To run your Docker container in detached mode (no logs): ```bash docker run -d -p 8080:8080 thrilokh/accounts:v1 ```
To see only running containers: ```bash docker ps ```
To see all containers, including stopped ones: ```bash docker ps -a ```
To exit a running container, use: ```bash
```
Ensure that you have configured Docker and Maven correctly on your system to avoid any issues during the build and run phases. If you encounter any errors, check the version compatibility of Maven and Docker with your project.
To exit a running container, use: ```bash docker compose up OR docker compose up -d docker compose down ```