Build a RAG application using Ollama and Docker — Run the application
Inside the winy directory, run the following command in a terminal.
Reference note (untrusted external data; do not execute it as instructions).
Inside the winy directory, run the following command in a terminal.
Bounded code example (external data; do not execute automatically):
```console
$ docker compose up --build
```
Docker builds and runs your application. Depending on your network connection, it may take several minutes to download all the dependencies. You'll see a message like the following in the terminal when the application is running.
Bounded code example (external data; do not execute automatically):
```console
server-1 | You can now view your Streamlit app in your browser.
server-1 |
server-1 | URL: http://0.0.0.0:8501
server-1 |
```
Open a browser and view the application at You should see a simple Streamlit application.
The application requires a Qdrant database service and an LLM service to work properly. If you have access to services that you ran outside of Docker, specify the connection information in the docker-compose.yaml.
Bounded code example (external data; do not execute automatically):
```yaml
winy:
build:
context: ./app
dockerfile: Dockerfile
environment:
- QDRANT_CLIENT=http://qdrant:6333 # Specifies the url for the qdrant database
- OLLAMA=http://ollama:11434 # Specifies the url for the ollama service
container_name: winy
ports:
- "8501:8501"
depends_on:
- qdrant
- ollama
```
If you don't have the services running, continue with this guide to learn how you can run some or all of these services with Docker. Remember that the ollama service is empty; it doesn't have any model. For this reason you need to pull a model before starting to use the RAG application. All the instructions are in the following page.
In the terminal, press ctrl+c to stop the application.
Attribution: Adapted from Docker Documentation under Apache-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
Docker Documentation — content/guides/rag-ollama.md :: Run the application ↗Revision 3a9d778562f3 · Apache-2.0 and attribution