--- title: Getting Started --- # Getting Started Dozzle supports multiple ways to run the application. You can run it using Docker CLI, Docker Compose, or in Swarm. The following sections will guide you through the process of setting up Dozzle. ## Running with Docker The easiest way to set up Dozzle is to use the CLI and mount `docker.sock` file. This file is usually located at `/var/run/docker.sock` and can be mounted with the `--volume` flag. You also need to expose the port to view Dozzle. By default, Dozzle listens on port 8080, but you can change the external port using `-p`. You can also run using compose or as a service in Swarm. ::: code-group ```sh docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 amir20/dozzle:latest ``` ```yaml [docker-compose.yml] # Run with docker compose up -d services: dozzle: image: amir20/dozzle:latest volumes: - /var/run/docker.sock:/var/run/docker.sock ports: - 8080:8080 ``` ```yaml [dozzle-stack.yml] # Run with docker stack deploy -c dozzle-stack.yml services: dozzle: image: amir20/dozzle:latest environment: - DOZZLE_MODE=swarm volumes: - /var/run/docker.sock:/var/run/docker.sock ports: - 8080:8080 networks: - dozzle deploy: mode: global networks: dozzle: driver: overlay ``` ```yaml [k8s-dozzle.yml] # rbac.yaml apiVersion: v1 kind: ServiceAccount metadata: name: pod-viewer --- # clusterrole.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: pod-viewer-role rules: - apiGroups: [""] resources: ["pods", "pods/log", "nodes"] verbs: ["get", "list", "watch"] - apiGroups: ["metrics.k8s.io"] resources: ["pods"] verbs: ["get", "list"] --- # clusterrolebinding.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: pod-viewer-binding subjects: - kind: ServiceAccount name: pod-viewer namespace: default roleRef: kind: ClusterRole name: pod-viewer-role apiGroup: rbac.authorization.k8s.io --- # deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: dozzle spec: replicas: 1 selector: matchLabels: app: dozzle template: metadata: labels: app: dozzle spec: serviceAccountName: pod-viewer containers: - name: dozzle image: amir20/dozzle:latest ports: - containerPort: 8080 env: - name: DOZZLE_MODE value: "k8s" ``` ::: See [swarm mode](/guide/swarm-mode) for more information on running Dozzle in Swarm and [Kubernetes](/guide/k8s) for running Dozzle in Kubernetes. > [!TIP] > If Docker Hub is blocked in your network, you can use the [GitHub Container Registry](https://ghcr.io/amir20/dozzle:latest) to pull the image. Use `ghcr.io/amir20/dozzle:latest` instead of `amir20/dozzle:latest`.