 {"id":517937,"date":"2025-01-09T07:35:00","date_gmt":"2025-01-09T14:35:00","guid":{"rendered":"https:\/\/jorgep.com\/blog\/?p=517937"},"modified":"2025-03-10T17:14:23","modified_gmt":"2025-03-11T00:14:23","slug":"installing-ollama-and-open-webui-in-docker-single-image","status":"publish","type":"post","link":"https:\/\/jorgep.com\/blog\/installing-ollama-and-open-webui-in-docker-single-image\/","title":{"rendered":"Installing Ollama and Open WebUI in Docker Single Image"},"content":{"rendered":"\n<p>When I initially installed Ollama and Open WebUI  I installed it in two separate images (Did not know any better!). It worked well for what I wanted but then as I played with other applications, I started to have too many containers in Docker, so I looked for a way to consolidate images.  ( Not sure at this point if this is a good or bad practice, but I am going to try it..<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>First Stop all of your existing containers.. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Open Docker Terminal<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>To run Open WebUI with Nvidia GPU support, use this command which facilitates a built-in, hassle-free installation of both Open WebUI and Ollama, ensuring that you can get everything up and running swiftly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"603\" src=\"https:\/\/jorgep.com\/blog\/wp-content\/uploads\/image-124-1024x603.png\" alt=\"\" class=\"wp-image-517938\" srcset=\"https:\/\/jorgep.com\/blog\/wp-content\/uploads\/image-124-1024x603.png 1024w, https:\/\/jorgep.com\/blog\/wp-content\/uploads\/image-124-300x177.png 300w, https:\/\/jorgep.com\/blog\/wp-content\/uploads\/image-124-768x452.png 768w, https:\/\/jorgep.com\/blog\/wp-content\/uploads\/image-124.png 1530w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After installation, you can access Open WebUI at\u00a0<a href=\"http:\/\/localhost:3000\/\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/localhost:3000<\/a>. <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I initially installed Ollama and Open WebUI I installed it in two separate images (Did not know any better!). It worked well for what I wanted but then as I played with other applications, I started to have too many containers in Docker, so I looked for a way to consolidate images. ( Not&#8230;<\/p>\n","protected":false},"author":2,"featured_media":461826,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","episode_type":"","audio_file":"","podmotor_file_id":"","podmotor_episode_id":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","filesize_raw":"","date_recorded":"","explicit":"","block":"","itunes_episode_number":"","itunes_title":"","itunes_season_number":"","itunes_episode_type":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[441],"tags":[930,919,871],"class_list":["post-517937","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-talk","tag-ai-series","tag-docker","tag-genai"],"taxonomy_info":{"category":[{"value":441,"label":"Tech Talk"}],"post_tag":[{"value":930,"label":"AI Series"},{"value":919,"label":"Docker"},{"value":871,"label":"GenAi"}]},"featured_image_src_large":["https:\/\/jorgep.com\/blog\/wp-content\/uploads\/jorgep-BlogPostGeneric.jpg",1024,512,false],"author_info":{"display_name":"Jorge Pereira","author_link":"https:\/\/jorgep.com\/blog\/author\/jorge\/"},"comment_info":0,"category_info":[{"term_id":441,"name":"Tech Talk","slug":"tech-talk","term_group":0,"term_taxonomy_id":451,"taxonomy":"category","description":"","parent":0,"count":668,"filter":"raw","cat_ID":441,"category_count":668,"category_description":"","cat_name":"Tech Talk","category_nicename":"tech-talk","category_parent":0}],"tag_info":[{"term_id":930,"name":"AI Series","slug":"ai-series","term_group":0,"term_taxonomy_id":940,"taxonomy":"post_tag","description":"","parent":0,"count":144,"filter":"raw"},{"term_id":919,"name":"Docker","slug":"docker","term_group":0,"term_taxonomy_id":929,"taxonomy":"post_tag","description":"","parent":0,"count":9,"filter":"raw"},{"term_id":871,"name":"GenAi","slug":"genai","term_group":0,"term_taxonomy_id":881,"taxonomy":"post_tag","description":"","parent":0,"count":78,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts\/517937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/comments?post=517937"}],"version-history":[{"count":0,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts\/517937\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/media\/461826"}],"wp:attachment":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/media?parent=517937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/categories?post=517937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/tags?post=517937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}