SoFunction
Updated on 2025-04-11

Docker-compose offline deployment of ollama+open-webui

docker compose deployment ollama + open-webui

	services: 
        ollama: 
            image: /ddn-k8s//ollama/ollama 
            container_name: ollama 
            restart: always 
            ports: - "11434:11434" 
            volumes: - ollama:/ollama 
            networks: - app-network 
        open-webui: 
            image: /open-webui/open-webui:main 
            container_name: open-webui 
            restart: always ports: - "3030:8080" 
            volumes: - open-webui:/app/backend/data 
            depends_on: - ollama 
            extra_hosts: - ":host-gateway" 
            networks: - app-network 
    volumes:
        ollama:
            name:ollama-ds
            external: true
       open-webui:
            name: webui-ds
            external: true
    networks:
        app-network:
            external: true
            name: ds-net
docker-compose up -d

Export the image

docker save -o ollama_image.tar /ddn-k8s//ollama/ollama 

docker save -o open-webui_image.tar /open-webui/open-webui:main

Import the image

// Load the mirrordocker load -i ollama_image.tar
docker load -i open-webui_image.tar

// Create data volumes and networksdocker volume create --name=ollama-ds
docker volume create --name=webui-ds
docker network create ds-net

// Start the servicedocker-compose up -d

// Verification Servicedocker ps

This is the article about the implementation steps of docker-compose offline deployment of ollama+open-webui. This is the end of this article. For more related docker-compose offline deployment of ollama+open-webui, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!