March 26Mar 26 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 March 26Mar 26 by thunderclap
March 27Mar 27 Community Expert Solution Short answer, try 8095:80Long answer, taken from docker docs:Publishing portsPublishing 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 trafficCONTAINER_PORT: The port number within the container that's listening for connectionsFor 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/
April 6Apr 6 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:8095You can verify the container is running and what ports are exposed with:docker psThe 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.