Skip to content

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

fix: remove unnecessary port mapping in Docker container test and improve backend copy instructions in Dockerfile

Mostafa Wahied5fd5c6ab85ff
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml
index b7d029c..869f075 100644
--- a/.github/workflows/docker-publish.yml
+++ b/.github/workflows/docker-publish.yml
@@ -60,7 +60,6 @@ jobs:
run: |
# Start container with correct port and give it time to initialize
docker run --rm -d --name test-portracker \
- -p 4999:4999 \
-e PORT=4999 \
-e DATABASE_PATH=/data/test.db \
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
diff --git a/Dockerfile b/Dockerfile
index 4bf0bde..325d21a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -55,7 +55,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /app
-# Copy the properly compiled backend
+# Copy package files to the backend directory
+COPY --from=backend-build /app/backend/package*.json ./backend/
+
+# Copy the rest of the compiled backend
COPY --from=backend-build /app/backend ./backend/
# Copy built frontend assets