Skip to content

Mock Api with basic crud operations using JsonFlatFileDataStore

License

Notifications You must be signed in to change notification settings

burger-mtbkr/json-api-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.Net 6.0 API using a JSON flat file DB

Prerequisites:

How to setup from thsi repo:

Or you can run the app directly from docker:

  • Pull the latest image using: docker pull loanburger/product-json-api:latest
  • Run the app: docker run -p <port>:80 loanburger/product-json-api:latest
  • You can access the api on http://localhost:/swagger/index.html

How to test:


Pushing to Docker Hub Repo:

If you want to push this to your own Docker Hub repository: you can follow these steps:

  1. You may need log out first docker logout then log back in using docker login.
  2. You need to include the namespace for Docker Hub to associate it with your account. The namespace is the same as your Docker Hub account name.
  3. If your image does not include your account name, you can rename it by tagging it. You can do this using docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]. e.g. docker tag dotnet-mongo-docker YOUR_DOCKERHUB_NAME/product-json-api:tag.
  4. You can then push your image by running this command: docker push YOUR_DOCKERHUB_NAME/product-json-api:tag.

Useful command:

  • docker build -t "YOUR_DOCKERHUB_NAME/product-json-api:tag" . - Build the image
  • docker push YOUR_DOCKERHUB_NAME/product-json-api:tag - Publish the image to docker hub
  • docker exec -it <containername> bash - allows you to run commands in the containers. See here for more info.
  • docker tag --help - Help info to tag an image

Helpful Links:

Troubleshooting

About

Mock Api with basic crud operations using JsonFlatFileDataStore

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published