- Then open the terminal and check:
docker info
or check docker version
docker -v
and docker compose version
docker-compose -v
- Clone the repository:
git clone https://github.com/ramsantos/ibm.git
- Build the maven project:
./mvnw clean package -DskipTests
- Build and Running the containers:
This command will build the docker containers and start them.
docker-compose up --build
URL BASE =http://localhost:8080
To include an address stating the TipoEnderecoEnum.
Enums availables:
RESIDENCIAL, COMERCIAL, NAO_ESPECIFICADO
- POST request to
/api/cliente
with a object as JSON creates a new "Cliente"; - PUT request to
/api/cliente
with a object as JSON updates the "Cliente" with UUID informed; - GET request to
/api/cliente?nome=Ricardo&cpf=02404626188
returns the "Cliente" with NAME Ricardo and CPF 02404626188; - DELETE request to
/api/cliente/0ada8da5-3abb-4c58-942f-7ca2d4fbc7bc
deletes the "Cliente" with UUID "0ada8da5-3abb-4c58-942f-7ca2d4fbc7bc";
- Check all the images you have:
docker images
- Stop containers:
docker-compose down
- Remove old stopped containers of docker-compose
docker-compose rm -f