How to use tmpfs mappings?


ptr727

Recommended Posts

I am trying to create a container that uses systemd and requires the use of tmpfs mappings.

E.g.

Docker Run Example:
docker run -d \
  --name=dwspectrum-test-container \
  --restart=unless-stopped \
  --network=host \
  --tmpfs /run \
  --tmpfs /run/lock \
  --tmpfs /tmp \
  -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
  -v "/.mount/media:/config/DW Spectrum Media" \
  -v /.mount/config:/opt/digitalwatchdog/mediaserver/var \
  ptr727/dwspectrum

Docker Compose Example:
services:
  dwspectrum:
    image: ptr727/dwspectrum
    container_name: dwspectrum-test-container
    hostname: dwspectrum-test-host
    domainname: foo.net
    build: .
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      - ./.mount/media:/config/DW Spectrum Media
      - ./.mount/config/:/opt/digitalwatchdog/mediaserver/var
    tmpfs:
      - /run
      - /run/lock
      - /tmp
    restart: unless-stopped
    network_mode: host
    ports:
      - 7001:7001

 

How do I add tmpfs mappings in Unraid's docker configuration, or do I need to specify them as additional options on the commandline?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.