Skip to content

Commit

Permalink
doc: add DinD troubleshooting tip
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-geller committed Nov 27, 2023
1 parent 8a0c1d9 commit 65782ea
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions content/docs/14.troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,99 @@ securityContext:
```
### Docker in Docker (DinD) on a Mac with ARM-based Apple silicon chip
If you are getting an error similar to: `java.io.IOException: com.sun.jna.LastErrorException: [111] Connection refused`, it might be related to a Docker in Docker (DinD) issue. Try using an embedded Docker server as shown below:
```yaml
volumes:
postgres-data:
driver: local
kestra-data:
driver: local
dind-socket:
driver: local
tmp-data:
driver: local
services:
postgres:
image: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: kestra
POSTGRES_USER: kestra
POSTGRES_PASSWORD: k3str4
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 30s
timeout: 10s
retries: 10
dind:
image: docker:dind
privileged: true
# user: "1000"
environment:
DOCKER_HOST: unix://dind/docker.sock
command:
- --log-level=fatal
# - --group=1000
volumes:
- dind-socket:/dind
- tmp-data:/tmp/kestra-wd
kestra:
image: kestra/kestra:latest-full
pull_policy: always
entrypoint: /bin/bash
# Note that this is meant for development only. Refer to the documentation for production deployments of Kestra which runs without a root user.
user: "root"
command:
- -c
- /app/kestra server standalone --worker-thread=128
volumes:
- kestra-data:/app/storage
- dind-socket:/dind
- tmp-data:/tmp/kestra-wd
environment:
KESTRA_CONFIGURATION: |
datasources:
postgres:
url: jdbc:postgresql://postgres:5432/kestra
driverClassName: org.postgresql.Driver
username: kestra
password: k3str4
kestra:
server:
basic-auth:
enabled: false
username: admin
password: kestra
repository:
type: postgres
storage:
type: local
local:
base-path: "/app/storage"
queue:
type: postgres
tasks:
tmp-dir:
path: /tmp/kestra-wd/tmp
url: http://localhost:8080/
ports:
- "8080:8080"
- "8081:8081"
depends_on:
postgres:
condition: service_started
dind:
condition: service_started
```
### Networking in Docker Compose
The docker-compose file provided as part of the [Getting Started](01.getting-started.md) guide doesn't configure networking for the Kestra containers. This means that you won't be able to access any services exposed via `localhost` on your local machine (e.g., another Docker container with a mapped port). Your machine and Docker container use a different network. To use a locally exposed service from Kestra container, you can use the `host.docker.internal` hostname or `172.17.0.1`. The `host.docker.internal` address allows you to reach your host machine's services from Kestra's container.
Expand Down

0 comments on commit 65782ea

Please sign in to comment.