Skip to content

An open source, self-hosted, real-time port monitoring and discovery tool.

fix: update Docker image test to use correct port and improve backend copy instructions in Dockerfile

Mostafa Wahied8317b892853c
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml
index 869f075..7862ace1 100644
--- a/.github/workflows/docker-publish.yml
+++ b/.github/workflows/docker-publish.yml
@@ -58,13 +58,14 @@ jobs:
- name: Test Docker image
if: github.event_name != 'pull_request'
run: |
- # Start container with correct port and give it time to initialize
docker run --rm -d --name test-portracker \
+ -p 4999:4999 \
+ -v /var/run/docker.sock:/var/run/docker.sock:ro \
-e PORT=4999 \
-e DATABASE_PATH=/data/test.db \
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
- # Wait for startup and show logs if it fails
+ # Wait for startup
sleep 15
# Check if container is still running
@@ -75,7 +76,7 @@ jobs:
exit 1
fi
- # Test the correct health endpoint from host
+ # Test the health endpoint from the host
if curl -f http://localhost:4999/api/health; then
echo "✅ Health check passed"
else
diff --git a/Dockerfile b/Dockerfile
index 325d21a..4bf0bde 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -55,10 +55,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /app
-# Copy package files to the backend directory
-COPY --from=backend-build /app/backend/package*.json ./backend/
-
-# Copy the rest of the compiled backend
+# Copy the properly compiled backend
COPY --from=backend-build /app/backend ./backend/
# Copy built frontend assets