run.sh 471 Bytes
Newer Older
Tanvir's avatar
Tanvir committed
1
2
#!/bin/bash

Timothy J. Baek's avatar
Timothy J. Baek committed
3
4
image_name="open-webui"
container_name="open-webui"
5
6
host_port=3000
container_port=8080
Tanvir's avatar
Tanvir committed
7
8
9
10
11

docker build -t "$image_name" .
docker stop "$container_name" &>/dev/null || true
docker rm "$container_name" &>/dev/null || true

12
docker run -d -p "$host_port":"$container_port" \
Tanvir's avatar
Tanvir committed
13
14
15
16
17
18
19
    --add-host=host.docker.internal:host-gateway \
    -v "${image_name}:/app/backend/data" \
    --name "$container_name" \
    --restart always \
    "$image_name"

docker image prune -f