CRUD using dotnet 6 and mysql 8 to run in a simple dockerized environment.
Tool | Version |
---|---|
Docker | 24.0.5 |
Docker Compose | 2.21.0 |
Dotnet | 6.0.121 |
Dotnet ef | 7.0.10 |
MySql | 8.0.34 |
Open your terminal in the project root directory (./MyDockerApi) and run the commands:
docker-compose build
docker-compose up
Check if the containers are up and running with the command docker ps
Open your terminal in the project root directory (./MyDockerApi) and run the commands:
dotnet ef database update
You can access the database via MySQL Workbench
using the host localhost:3307
and see that a table called 'Task' was created in TaskDb.
Now you can open your browser and access http://localhost:5000/swagger/index.html
and test the CRUD operations.