Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Docker Compose port question

Featured Replies

I'm trying to install Resourcespace through Docker Compose. Everything is installed but for some reason I can't access it through the port I've configured. I'm hoping someone might be able to point me in the right direction in getting this working.

The github files are here.

And I've configured the .yaml as so.

services:
  resourcespace:
    build: .
    container_name: resourcespace
    restart: unless-stopped
    depends_on:
      - mariadb
    volumes:
      - filestore:/var/www/html/filestore
      - ./config.php:/var/www/html/include/config.php
    networks:
      - frontend
      - backend
    environment:
      - TZ=America/Chicago
    ports:
      - "80:8095"
  mariadb:
    image: mariadb
    container_name: mariadb
    restart: unless-stopped
    env_file:
      - db.env
    volumes:
      - mariadb:/var/lib/mysql
    networks:
      - backend
networks:
  frontend:
  backend:
volumes:
  mariadb:
  filestore:

I've tried changing the port from 80:80 to 8095 but that didn't help. I also tried 8095:8095 and no luck. I also tried forcing the port under environment using PORT=8095 but no go.

Any ideas? Thanks.

Edited by thunderclap

Solved by tjb_altf4

  • Community Expert
  • Solution

Short answer, try 8095:80

Long answer, taken from docker docs:

Publishing ports

Publishing a port provides the ability to break through a little bit of networking isolation by setting up a forwarding rule. As an example, you can indicate that requests on your host’s port 8080 should be forwarded to the container’s port 80. Publishing ports happens during container creation using the -p (or --publish) flag with docker run. The syntax is:

 docker run -d -p HOST_PORT:CONTAINER_PORT nginx
  • HOST_PORT: The port number on your host machine where you want to receive traffic

  • CONTAINER_PORT: The port number within the container that's listening for connections

For example, to publish the container's port 80 to host port 8080:

 docker run -d -p 8080:80 nginx

Now, any traffic sent to port 8080 on your host machine will be forwarded to port 80 within the container.

https://docs.docker.com/get-started/docker-concepts/running-containers/publishing-ports/

  • 2 weeks later...

To expand on the port mapping: the format in docker-compose is always host_port:container_port. Looking at the ResourceSpace Docker image, it runs Apache on port 80 inside the container. Your compose file needs to map an external port to that internal port 80.

If you had:

ports:

- "8095:8095"

That maps host port 8095 to container port 8095, but nothing is listening on 8095 inside the container. Apache is on 80. Change it to:

ports:

- "8095:80"

Then access it at http://your-unraid-ip:8095

You can verify the container is running and what ports are exposed with:

docker ps

The PORTS column will show the mapping. If it shows 0.0.0.0:8095->80/tcp then the mapping is correct.

One other thing to check on Unraid specifically: make sure no other Docker container is already using port 8095. Go to the Docker tab in the Unraid WebGUI and check the port assignments for your existing containers. Port conflicts will cause the container to fail to start silently.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.