Skip to content

Dockerfile fails with Deno 2.x - "deno install -A" no longer works #34

@GuideThomas

Description

@GuideThomas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions