This documentation provides information on how to use the georgegozal/flask-books-api Docker image to run the Flask Books API. The Docker image includes the Flask Books API along with PostgreSQL integration.
Before using the Docker image, ensure that you have the following prerequisites: Docker installed on your system. If not, you can download and install Docker from here.
docker network create flask-books
The Flask Books API requires a PostgreSQL database. Make sure you have a PostgreSQL server running on the flask-books network. You can create a PostgreSQL container using the following command:
docker network create flask-books
docker run -d --name postgres-db --network flask-books -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=books postgres:latest
To pull the Flask Books API Docker image from Docker Hub, use the following command:
docker pull georgegozal/flask-books-api:1.0.0
Once you have the Docker image, you can run the Flask Books container using the following command:
docker run -p 5000:5000 --name flask_books_api -e POSTGRES_HOST=postgres-db -v /app/app --net flask-books georgegozal/flask-books-api:1.0.0
Once the container is running, you can access the Flask Movies app by navigating to
http://localhost:5000 in your web browser.
Content type
Image
Digest
sha256:3d6223145…
Size
36.4 MB
Last updated
about 3 years ago
docker pull georgegozal/flask-books-api:1.0.0