-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from mecattaf/patch-1
Create Containerfile.ollama
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Use the customized bluefin-cli as the base image | ||
ARG SOURCE_IMAGE_NAME="${SOURCE_IMAGE_NAME:-wolfi-toolbox}" | ||
ARG SOURCE_IMAGE_REGISTRY="${SOURCE_IMAGE_REGISTRY:-ghcr.io/ublue-os}" | ||
ARG SOURCE_IMAGE="${SOURCE_IMAGE_REGISTRY}/${SOURCE_IMAGE_NAME}" | ||
|
||
FROM $SOURCE_IMAGE:latest | ||
|
||
# Metadata | ||
LABEL description="A container image with integrated Ollama and OpenWebUI for development environments." | ||
|
||
# Install Homebrew packages (assuming the base image is set up for Homebrew) | ||
RUN brew install gum && \ | ||
brew install ollama | ||
|
||
# Setup Ollama environment | ||
RUN mkdir -p /opt/ollama | ||
|
||
# Pull the OpenWebUI container image and configure it | ||
RUN podman pull ghcr.io/open-webui/open-webui:latest && \ | ||
podman create --name ollama-web -e OLLAMA_BASE_URL=http://localhost:11434 \ | ||
-e WEBUI_SECRET_KEY=abc123 -e DEFAULT_USER_ROLE=admin -e ENABLE_SIGNUP=true \ | ||
-p 8080:8080 ghcr.io/open-webui/open-webui:latest | ||
|
||
# Expose ports for Ollama and OpenWebUI | ||
EXPOSE 11434 8080 | ||
|
||
# Configure entrypoint and command to keep the container running and services operational | ||
ENTRYPOINT ["podman", "systemd", "--user"] | ||
CMD ["--keep-running"] |