Problem
The current Dockerfile fails to build with Deno 2.x (tested with 2.3.1):
error: the following required arguments were not provided:
--global
Note: Permission flags can only be used in a global setting
Cause
Deno 2.x changed the syntax for deno install. The -A flag (allow all permissions) is no longer valid for local installs.
Solution
Update the Dockerfile to use --allow-import instead:
FROM denoland/deno:2.3.1
WORKDIR /app
COPY . .
RUN deno install --allow-import
CMD [ "deno", "task", "run" ]
Additional Issue: Docker Network
If CouchDB runs in a separate container, the bridge cannot reach localhost:5984 due to Docker network isolation.
Solution: Add network_mode: host to docker-compose.yml:
services:
bridge:
build: .
volumes:
- ./data:/app/data
- ./dat:/app/dat
- /path/to/vault:/path/to/vault
network_mode: host
restart: unless-stopped
Environment
- Deno: 2.3.1
- Docker: 24.x
- OS: Debian 12
I hope this helps others facing the same issue
Problem
The current Dockerfile fails to build with Deno 2.x (tested with 2.3.1):
Cause
Deno 2.x changed the syntax for
deno install. The-Aflag (allow all permissions) is no longer valid for local installs.Solution
Update the Dockerfile to use
--allow-importinstead:Additional Issue: Docker Network
If CouchDB runs in a separate container, the bridge cannot reach
localhost:5984due to Docker network isolation.Solution: Add
network_mode: hostto docker-compose.yml:Environment
I hope this helps others facing the same issue