Skip to content

anonymous docker volume is being created for the mongo db container, even when defining volume bind #131

Closed as not planned
@mrboombasticdk

Description

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I don't know if this have any importance, but I'm gonna send it in anyway, because i think its annoying and confusing.
Feel free to correct me if I'm wrong.

Upon deployment of the container, a anonymous docker volume is being created for the /config directory, even though i have defined a volume mount, that points to a local folder for the /config folder.

It is using the mount to store the actual, because i can see that the auto updates is up to date, but it is still creating the volume either way. I don't know if I'm doing something wrong, but i have dozens of other containers running, and i have never seen this before.

Feel free to close the issue, if it is intended, but i wouldn't imagine it is.

Expected Behavior

No volume should be created when a volume is defined for the /config directory

Steps To Reproduce

Use the compose config i provided, otherwise, the official documentation

Environment

- OS: Debian 12
- How docker service was installed: Using the official documentation

CPU architecture

x86-64

Docker creation

services:
  unifi-network-application:
    image: lscr.io/linuxserver/unifi-network-application:latest
    container_name: unifi-network-application
    restart: unless-stopped
    depends_on:
      unifi-db:
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=
      - MONGO_USER=
      - MONGO_PASS=
      - MONGO_HOST=
      - MONGO_PORT=27017
      - MONGO_DBNAME=
      - MONGO_AUTHSOURCE=
      - MEM_LIMIT=1024 #optional
      - MEM_STARTUP=1024 #optional
    volumes:
      - ./server/data/config:/config
    ports:
      - 8443:8443/tcp
      - 3478:3478/udp
      - 10001:10001/udp
      - 8080:8080/tcp
      - 1900:1900/udp #optional
    networks:
      - unifi_backend

  unifi-db:
    image: mongo:4.4.25
    container_name: unifi-db
    restart: unless-stopped
    environment:
      - MONGO_INITDB_ROOT_USERNAME=
      - MONGO_INITDB_ROOT_PASSWORD=
      - MONGO_USER=
      - MONGO_PASS=
      - MONGO_DBNAME=
      - MONGO_AUTHSOURCE=
    volumes:
      - ./db/data:/data/db
      - ./db/data/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro
    command: 
      mongod --auth --port 27017
    networks:
      - unifi_backend

networks:
  unifi_backend:
    external: true

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: 9.0.108-ls76
Build-date: 2025-01-23T07:45:25+00:00
───────────────────────────────────────
    
[custom-init] No custom files found, skipping

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions