# Deploying `big-AGI` with Docker Utilize Docker containers to deploy the big-AGI application for an efficient and automated deployment process. Docker ensures faster development cycles, easier collaboration, and seamless environment management. ## Build and run your container 🔧 1. **Clone big-AGI** ```bash git clone https://github.com/enricoros/big-agi.git cd big-agi ``` 2. **Build the Docker Image**: Build a local docker image from the provided Dockerfile: ```bash docker build -t big-agi . ``` 3. **Run the Docker Container**: start a Docker container from the newly built image, and expose its http port 3000 to your `localhost:3000` using: ```bash docker run -d -p 3000:3000 big-agi ``` 4. Browse to [http://localhost:3000](http://localhost:3000)
## Run Official Containers 📦 `big-AGI` is pre-built from source code and published as a Docker image on the GitHub Container Registry (ghcr). The build process is transparent, and happens via GitHub Actions, as described in the file. ### Official Images: [ghcr.io/enricoros/big-agi](https://github.com/enricoros/big-agi/pkgs/container/big-agi) #### Run using *docker* 🚀 ```bash docker run -d -p 3000:3000 ghcr.io/enricoros/big-agi:latest ``` #### Run using *docker-compose* 🚀 If you have Docker Compose installed, you can run the Docker container with `docker-compose up` to pull the Docker image (if it hasn't been pulled already) and start a Docker container. If you want to update the image to the latest version, you can run `docker-compose pull` before starting the service. ```bash docker-compose up -d ``` ### Make Local Services Visible to Docker 🌐 To make local services running on your host machine accessible to a Docker container, such as a [Browseless](./config-feature-browse.md) service or a local API, you can follow this simplified guide: | Operating System | Steps to Make Local Services Visible to Docker | |:------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Windows and macOS | Use the special DNS name `host.docker.internal` to refer to the host machine from within the Docker container. No additional network configuration is required. Access local services using `host.docker.internal:`. | | Linux | Two options: *A*. Use --network="host" (`docker run --network="host" -d big-agi`) when running the Docker container to merge the container within the host network stack; however, this reduces container isolation. Alternatively: *B*. Connect to local services using the host's IP address directly, as host.docker.internal is not available by default on Linux. |
### More Information The [`Dockerfile`](../Dockerfile) describes how to create a Docker image. It establishes a Node.js environment, installs dependencies, and creates a production-ready version of the application as a local container. The [`docker-compose.yaml`](../docker-compose.yaml) file is configured to run the official image (big-agi:latest). This file is used to define the `big-agi` service, to expose port 3000 on the host, and launch big-AGI within the container (startup command). The [`.github/workflows/docker-image.yml`](../.github/workflows/docker-image.yml) file is used to build the Official Docker images and publish them to the GitHub Container Registry (ghcr). The build process is transparent and happens via GitHub Actions.
Leverage Docker's capabilities for a reliable and efficient big-AGI deployment!