From e3363598e767abb7b36b712baea3a475df4e1642 Mon Sep 17 00:00:00 2001 From: Eric Dorr <> Date: Fri, 5 Jan 2024 23:40:59 +0100 Subject: [PATCH 1/3] fix for building docker container directly from github url --- Dockerfile | 4 +++- app/package-lock.json | 2 +- app/package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index fde8e2b..0660d96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,9 @@ #CMD ["/opt/app/index.js", "/var/lib/fritzbox-to-mqtt-gw/config.json"] FROM node:18.12-alpine -COPY app/dist /opt/app/ +COPY app /opt/app/ WORKDIR /opt/app/ +RUN npm run build +WORKDIR /opt/app/dist/ CMD ["node", "index.js", "/var/lib/fritzbox-to-mqtt-gw/config.json"] diff --git a/app/package-lock.json b/app/package-lock.json index 640802a..2429f06 100755 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -28,7 +28,7 @@ "jest": "29.2.2", "jest-junit": "14.0.1", "jest-standard-reporter": "2.0.0", - "npm-run-all": "4.1.5", + "npm-run-all": "^4.1.5", "rimraf": "3.0.2", "testcontainers": "9.0.0", "ts-jest": "29.0.3", diff --git a/app/package.json b/app/package.json index 2d5f404..9742a4c 100755 --- a/app/package.json +++ b/app/package.json @@ -32,7 +32,7 @@ "jest": "29.2.2", "jest-junit": "14.0.1", "jest-standard-reporter": "2.0.0", - "npm-run-all": "4.1.5", + "npm-run-all": "^4.1.5", "rimraf": "3.0.2", "testcontainers": "9.0.0", "ts-jest": "29.0.3", From 8df0fe25c7eb83af91f12eebe13e5f627c2036ee Mon Sep 17 00:00:00 2001 From: Eric Dorr <> Date: Sat, 6 Jan 2024 00:08:07 +0100 Subject: [PATCH 2/3] added missing npm features --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 0660d96..a5072f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ FROM node:18.12-alpine COPY app /opt/app/ WORKDIR /opt/app/ +RUN npm install npm-run-all --save-dev RUN npm run build WORKDIR /opt/app/dist/ From 08d30e76f08d80ee854d73fcca3d9eae72f01f99 Mon Sep 17 00:00:00 2001 From: Eric Dorr <> Date: Sat, 6 Jan 2024 00:18:38 +0100 Subject: [PATCH 3/3] create missing directory --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index a5072f7..2a6f59a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,6 @@ WORKDIR /opt/app/ RUN npm install npm-run-all --save-dev RUN npm run build WORKDIR /opt/app/dist/ +RUN mkdir /var/lib/fritzbox-to-mqtt-gw CMD ["node", "index.js", "/var/lib/fritzbox-to-mqtt-gw/config.json"]