OpenSprinkler › Forums › Comments, Suggestions, Requests › Weather Service Docker Error
Tagged: Weather Service Docker
- This topic has 5 replies, 2 voices, and was last updated 9 months, 2 weeks ago by
SM.
-
AuthorPosts
-
August 28, 2025 at 3:35 pm #83498
SMSpectatorI tried to install the Weather Service via the ./build-docker.sh but im getting errors:
root@OS-ws:~/weather# ./build-docker.sh Building ETo Data [+] Building 0.2s (1/1) FINISHED docker:default => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 2B 0.0s ERROR: failed to build: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory /root/weather [+] Building 83.6s (24/28) docker:default => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 848B 0.0s => [internal] load metadata for docker.io/library/node:lts-alpine 2.1s => [internal] load metadata for docker.io/library/alpine:latest 2.2s => [internal] load .dockerignore 0.1s => => transferring context: 2B 0.0s => [build_eto 1/10] FROM docker.io/library/alpine:latest@sha256:4bcff63911fcb4448bd4fdacec 0.3s => => resolve docker.io/library/alpine:latest@sha256:4bcff63911fcb4448bd4fdacec207030997caf 0.1s => => sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311 9.22kB / 9.22kB 0.0s => => sha256:eafc1edb577d2e9b458664a15f23ea1c370214193226069eb22921169fc7e4 1.02kB / 1.02kB 0.0s => => sha256:9234e8fb04c47cfe0f49931e4ac7eb76fa904e33b7f8576aec0501c085f02516 581B / 581B 0.0s => [internal] load build context 0.2s => => transferring context: 283.51kB 0.0s => [build_node 1/9] FROM docker.io/library/node:lts-alpine@sha256:1b2479dd35a99687d6638f59 20.9s => => resolve docker.io/library/node:lts-alpine@sha256:1b2479dd35a99687d6638f5976fd235e26c5 0.1s => => sha256:3cdbfff583b099a5f687dbae4970360a1829bc85ae0b0fdcd811f210886 50.99MB / 50.99MB 17.0s => => sha256:1b2479dd35a99687d6638f5976fd235e26c5b37e8122f786fcd5fe231d63de 6.41kB / 6.41kB 0.0s => => sha256:dbb65b3b08bd9d4d4a85299ad4d668b0e709a0601cecb5969f4dbb1dd89408 1.72kB / 1.72kB 0.0s => => sha256:8a3ae2e7d0c5383fcf30aec6c723ce8d383c10ea3686cfae29c54db736468f 6.42kB / 6.42kB 0.0s => => sha256:2d381af09514b1801b65ecb2885e6a6fbe41da5a4b6d708f9ff811f21cb9b3 1.26MB / 1.26MB 1.0s => => sha256:e62ad5808fa82ae91d738bb6d1339d62a8d4b7e908d071ee1287c08c3000cdd4 447B / 447B 0.7s => => extracting sha256:3cdbfff583b099a5f687dbae4970360a1829bc85ae0b0fdcd811f2108864d8e4 3.4s => => extracting sha256:2d381af09514b1801b65ecb2885e6a6fbe41da5a4b6d708f9ff811f21cb9b328 0.1s => => extracting sha256:e62ad5808fa82ae91d738bb6d1339d62a8d4b7e908d071ee1287c08c3000cdd4 0.0s => [build_eto 2/10] WORKDIR /eto 0.1s => [build_eto 3/10] RUN apk add --no-cache tiff imagemagick gcc libc-dev build-base 19.3s => [build_eto 4/10] COPY /baselineEToData/dataPreparer.c ./ 0.2s => [build_eto 5/10] COPY /baselineEToData/prepareData.sh ./ 1.1s => [build_node 2/9] WORKDIR /weather 0.2s => [build_eto 6/10] COPY /baselineEToData/baseline.sh ./ 3.5s => [build_node 3/9] COPY /tsconfig.json ./ 3.4s => [stage-2 3/6] COPY /package.json ./ 3.4s => [stage-2 4/6] RUN mkdir baselineEToData 0.6s => [build_node 4/9] COPY /package.json ./ 0.4s => [build_eto 7/10] RUN chmod +x ./prepareData.sh ./baseline.sh 0.6s => [build_node 5/9] COPY /package-lock.json ./ 0.2s => ERROR [build_eto 8/10] RUN ash ./prepareData.sh 20 54.8s => [build_node 6/9] RUN npm install 44.5s => [build_node 7/9] COPY /build.mjs ./ 5.1s => [build_node 8/9] COPY /src ./src 4.5s => CANCELED [build_node 9/9] RUN npm run build 1.4s ------ > [build_eto 8/10] RUN ash ./prepareData.sh 20: 0.361 Compiling dataPreparer.c... 0.540 Downloading ocean mask image... 0.594 Connecting to static1.squarespace.com (151.101.64.238:80) 0.654 saving to 'Ocean_Mask.png' 1.009 Ocean_Mask.png 100% |********************************| 2939k 0:00:00 ETA 1.010 'Ocean_Mask.png' saved 1.011 Converting ocean mask image to binary format... 4.247 Downloading MOD16 GeoTIFF... 4.610 Connecting to files.ntsg.umt.edu (150.131.194.90:80) 5.062 saving to 'MOD16A3_PET_2000_to_2013_mean.tif' 5.260 MOD16A3_PET_2000_to_ 0% | | 13435 --:--:-- ETA 6.233 MOD16A3_PET_2000_to_ 0% | | 1033k 0:12:15 ETA 7.234 MOD16A3_PET_2000_to_ 2% | | 9228k 0:01:59 ETA 8.234 MOD16A3_PET_2000_to_ 4% |* | 17.4M 0:01:20 ETA 9.234 MOD16A3_PET_2000_to_ 7% |** | 27.4M 0:01:02 ETA 10.23 MOD16A3_PET_2000_to_ 9% |*** | 35.8M 0:00:55 ETA 11.23 MOD16A3_PET_2000_to_ 11% |*** | 43.5M 0:00:52 ETA 12.23 MOD16A3_PET_2000_to_ 14% |**** | 52.5M 0:00:48 ETA 13.23 MOD16A3_PET_2000_to_ 17% |***** | 62.9M 0:00:43 ETA 14.23 MOD16A3_PET_2000_to_ 20% |****** | 74.3M 0:00:39 ETA 15.23 MOD16A3_PET_2000_to_ 22% |******* | 84.6M 0:00:36 ETA 16.23 MOD16A3_PET_2000_to_ 26% |******** | 95.9M 0:00:34 ETA 17.25 MOD16A3_PET_2000_to_ 28% |********* | 105M 0:00:32 ETA 18.23 MOD16A3_PET_2000_to_ 31% |********** | 115M 0:00:30 ETA 19.23 MOD16A3_PET_2000_to_ 34% |********** | 126M 0:00:28 ETA 20.23 MOD16A3_PET_2000_to_ 37% |*********** | 137M 0:00:26 ETA 21.23 MOD16A3_PET_2000_to_ 40% |************ | 148M 0:00:25 ETA 22.23 MOD16A3_PET_2000_to_ 43% |************* | 158M 0:00:23 ETA 23.23 MOD16A3_PET_2000_to_ 45% |************** | 168M 0:00:22 ETA 24.23 MOD16A3_PET_2000_to_ 48% |*************** | 178M 0:00:21 ETA 25.23 MOD16A3_PET_2000_to_ 51% |**************** | 188M 0:00:19 ETA 26.23 MOD16A3_PET_2000_to_ 54% |***************** | 199M 0:00:18 ETA 27.23 MOD16A3_PET_2000_to_ 56% |****************** | 209M 0:00:17 ETA 28.25 MOD16A3_PET_2000_to_ 58% |****************** | 215M 0:00:17 ETA 29.29 MOD16A3_PET_2000_to_ 59% |******************* | 219M 0:00:16 ETA 30.26 MOD16A3_PET_2000_to_ 60% |******************* | 222M 0:00:17 ETA 31.24 MOD16A3_PET_2000_to_ 61% |******************* | 226M 0:00:16 ETA 32.24 MOD16A3_PET_2000_to_ 62% |******************** | 230M 0:00:16 ETA 33.23 MOD16A3_PET_2000_to_ 63% |******************** | 235M 0:00:16 ETA 34.24 MOD16A3_PET_2000_to_ 64% |******************** | 239M 0:00:16 ETA 35.23 MOD16A3_PET_2000_to_ 66% |********************* | 243M 0:00:15 ETA 36.24 MOD16A3_PET_2000_to_ 67% |********************* | 248M 0:00:15 ETA 37.23 MOD16A3_PET_2000_to_ 68% |********************* | 252M 0:00:15 ETA 38.23 MOD16A3_PET_2000_to_ 69% |********************** | 257M 0:00:14 ETA 39.23 MOD16A3_PET_2000_to_ 71% |********************** | 262M 0:00:14 ETA 40.23 MOD16A3_PET_2000_to_ 72% |*********************** | 268M 0:00:13 ETA 41.23 MOD16A3_PET_2000_to_ 74% |*********************** | 274M 0:00:12 ETA 42.23 MOD16A3_PET_2000_to_ 76% |************************ | 280M 0:00:11 ETA 43.23 MOD16A3_PET_2000_to_ 77% |************************ | 286M 0:00:11 ETA 44.23 MOD16A3_PET_2000_to_ 79% |************************* | 292M 0:00:10 ETA 45.23 MOD16A3_PET_2000_to_ 81% |************************* | 299M 0:00:09 ETA 46.25 MOD16A3_PET_2000_to_ 83% |************************** | 306M 0:00:08 ETA 47.24 MOD16A3_PET_2000_to_ 85% |*************************** | 314M 0:00:07 ETA 48.23 MOD16A3_PET_2000_to_ 87% |**************************** | 322M 0:00:06 ETA 49.24 MOD16A3_PET_2000_to_ 90% |**************************** | 331M 0:00:04 ETA 50.23 MOD16A3_PET_2000_to_ 92% |***************************** | 340M 0:00:03 ETA 51.23 MOD16A3_PET_2000_to_ 95% |****************************** | 350M 0:00:02 ETA 52.23 MOD16A3_PET_2000_to_ 97% |******************************* | 360M 0:00:01 ETA 53.04 MOD16A3_PET_2000_to_ 100% |********************************| 368M 0:00:00 ETA 53.04 'MOD16A3_PET_2000_to_2013_mean.tif' saved 53.04 Converting MOD16 GeoTIFF to binary format... 53.90 Killed 53.91 Preparing data... 53.91 An error occurred opening image file while finding min/max value. ------ Dockerfile:12 -------------------- 10 | RUN chmod +x ./prepareData.sh ./baseline.sh 11 | 12 | >>> RUN ash ./prepareData.sh 20 13 | RUN ash ./baseline.sh 14 | RUN rm Baseline_ETo_Data-Pass_*.bin -------------------- ERROR: failed to build: failed to solve: process "/bin/sh -c ash ./prepareData.sh 20" did not complete successfully: exit code: 1What am I doing wrong?
Thank you very much,
SigiAugust 29, 2025 at 3:24 pm #83512
RayKeymasterIf I had to take a guess, from this line of message:
53.90 Killed
it sounds like you ran out of memory/storage. Could you monitor your memory and storage and make sure you have at least a couple of gigabytes of storage?If you just want to run the weather service without modification, you can use the docker image “ghcr.io/opensprinkler/weather-server:release”. That’s automatically built from our latest release.
August 30, 2025 at 6:38 am #83516
SMSpectatorSorry for not giving all my the information about my settig:
Its a Debian Trixie LXC in Proxmox 9 with 1GB RAM and 8GB diskspace.I retried building the docker image with 4GB RAM and 7GB free diskspace – same result as above.
I also tested the docker image you mentioned:
root@OS-ws:~# docker pull ghcr.io/opensprinkler/weather-server:release release: Pulling from opensprinkler/weather-server 9824c27679d3: Already exists 3cdbfff583b0: Pull complete 2d381af09514: Pull complete e62ad5808fa8: Pull complete bf3ce5a743b4: Pull complete e167d4b4ea27: Pull complete e44afd296236: Pull complete 8eb2571cdc09: Pull complete 57411ac3eead: Pull complete Digest: sha256:687c41841777043842c497aff2f642dfaca730093243746390a5a27889ef1865 Status: Downloaded newer image for ghcr.io/opensprinkler/weather-server:release ghcr.io/opensprinkler/weather-server:release root@OS-ws:~# docker run --name weather-service ghcr.io/opensprinkler/weather-server:release > [email protected] start > node dist/index.cjs /weather/dist/index.cjs:35111 throw "GOOGLE_MAPS_API_KEY environment variable is not defined."; ^ GOOGLE_MAPS_API_KEY environment variable is not defined. (Use <code>node --trace-uncaught ...</code> to show where the exception was thrown) Node.js v22.18.0I think here is also something wrong, the webpage isnt reachable on port 3000.
After that I tried to follow the local-installation.md:
root@OS-ws:~# curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -l ================================================================================ ================================================================================ DEPRECATION WARNING Node.js 11.x is no longer actively supported! You will not receive security or critical stability updates for this version. You should migrate to a supported version of Node.js as soon as possible. Use the installation script that corresponds to the version of Node.js you wish to install. e.g. * https://deb.nodesource.com/setup_16.x — Node.js 16 "Gallium" * https://deb.nodesource.com/setup_18.x — Node.js 18 LTS "Hydrogen" (recommended) * https://deb.nodesource.com/setup_19.x — Node.js 19 "Nineteen" * https://deb.nodesource.com/setup_20.x — Node.js 20 "Iron" (current) Please see https://github.com/nodejs/Release for details about which version may be appropriate for you. The NodeSource Node.js distributions repository contains information both about supported versions of Node.js and supported Linux distributions. To learn more about usage, see the repository: https://github.com/nodesource/distributions ================================================================================ ================================================================================ Continuing in 20 seconds ... ================================================================================ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ================================================================================ SCRIPT DEPRECATION WARNING This script, located at https://deb.nodesource.com/setup_X, used to install Node.js is deprecated now and will eventually be made inactive. Please visit the NodeSource distributions Github and follow the instructions to migrate your repo. https://github.com/nodesource/distributions The NodeSource Node.js Linux distributions GitHub repository contains information about which versions of Node.js and which Linux distributions are supported and how to install it. https://github.com/nodesource/distributions SCRIPT DEPRECATION WARNING ================================================================================ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ================================================================================ TO AVOID THIS WAIT MIGRATE THE SCRIPT Continuing in 60 seconds (press Ctrl-C to abort) ... ## Installing the NodeSource Node.js 11.x repo... ## Populating apt-get cache... + apt-get update Hit:1 http://deb.debian.org/debian trixie InRelease Get:2 http://security.debian.org trixie-security InRelease [43.4 kB] Get:3 http://deb.debian.org/debian trixie-updates InRelease [47.1 kB] Hit:4 https://download.docker.com/linux/debian trixie InRelease Fetched 90.5 kB in 0s (336 kB/s) Reading package lists... Done ## Confirming "trixie" is supported... + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_11.x/dists/trixie/Release' ## Your distribution, identified as "trixie", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support root@OS-ws:~# sudo apt-get install -y nodejs npm Reading package lists... Done Building dependency tree... Done Reading state information... Done nodejs is already the newest version (20.19.2+dfsg-1). npm is already the newest version (9.2.0~ds1-3). 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. root@OS-ws:~# git clone https://github.com/OpenSprinkler/OpenSprinkler-Weather.git weather Cloning into 'weather'... remote: Enumerating objects: 2829, done. remote: Counting objects: 100% (426/426), done. remote: Compressing objects: 100% (101/101), done. remote: Total 2829 (delta 342), reused 344 (delta 311), pack-reused 2403 (from 2) Receiving objects: 100% (2829/2829), 987.90 KiB | 1.61 MiB/s, done. Resolving deltas: 100% (1817/1817), done. root@OS-ws:~# cd weather root@OS-ws:~/weather# npm install npm WARN tar TAR_ENTRY_ERROR EINVAL: invalid argument, fchown npm WARN deprecated @types/[email protected]: This is a stub types definition. nock provides its own type definitions, so you do not need this installed. npm WARN tar TAR_ENTRY_ERROR EINVAL: invalid argument, fchown npm WARN tar TAR_ENTRY_ERROR EINVAL: invalid argument, fchown npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm WARN tar TAR_ENTRY_ERROR EINVAL: invalid argument, fchown npm WARN tar TAR_ENTRY_ERROR EINVAL: invalid argument, fchown npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported npm WARN deprecated [email protected]: no longer maintained added 286 packages, and audited 287 packages in 23s 56 packages are looking for funding run <code>npm fund</code> for details 6 vulnerabilities (3 low, 3 high) To address issues that do not require attention, run: npm audit fix To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. Run <code>npm audit</code> for details. root@OS-ws:~/weather# npm run compile npm ERR! Missing script: "compile" npm ERR! npm ERR! To see a list of scripts, run: npm ERR! npm run npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2025-08-30T11_20_13_891Z-debug-0.logSo I dont know what I can try to make it run.
Maybe there is a problem with Debian Trixie?
August 30, 2025 at 6:45 am #83518
RayKeymasterFirst, to build the docker yourself you actually need at least 30+ GB of free disk space, because it needs to build the baseline ETo database in 20 passes and that requires a lot of disk space. 8GB is definitely not enough.
Second, to run the weather service, you need to create a .env file in the folder, which contains basic parameters like the server port, geocoder, and GOOGLE_MAPS_API_KEY if using GoogleMap as geocoder. Here is one example:
HOST=0.0.0.0
PORT=3000
GEOCODER=GoogleMaps
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
WEATHER_PROVIDER=OpenMeteoIf you don’t have a google maps API key, just provide some random string as the key — without a valid key you won’t be able to decode a location name (e.g. zip code, city,state name) but you can still use GPS coord as location.
August 30, 2025 at 11:32 am #83520
SMSpectatorThank you very much!
The GOOGLE_MAPS_API_KEY did it.
Now it works Like expected.Is there a documentaion of the possibilites of the .env file?
E.g. how to use GPS coord as location.August 31, 2025 at 4:34 am #83521
SMSpectatorSorry, but it looks like I’m a complete newbie with Docker. My container crashes every few minutes, and I find the following in the log:
> [email protected] start > node dist/index.cjs OpenSprinkler Weather Service now listening on 0.0.0.0:3000 OpenSprinkler Weather Service now listening for local weather stream Loaded baseline ETo data. /weather/dist/index.cjs:34609 timestamp: req.query.dateutc === "now" ? moment().unix() : moment(req.query.dateutc + "Z").unix(), ^ ReferenceError: moment is not defined at captureWUStream (/weather/dist/index.cjs:34609:55) at Layer.handle [as handle_request] (/weather/dist/index.cjs:17717:9) at next (/weather/dist/index.cjs:17886:17) at Route.dispatch (/weather/dist/index.cjs:17866:7) at Layer.handle [as handle_request] (/weather/dist/index.cjs:17717:9) at /weather/dist/index.cjs:18088:19 at Function.process_params (/weather/dist/index.cjs:18124:16) at next (/weather/dist/index.cjs:18084:14) at urlencodedParser (/weather/dist/index.cjs:17001:11) at Layer.handle [as handle_request] (/weather/dist/index.cjs:17717:9) Node.js v22.18.0 > [email protected] start > node dist/index.cjs OpenSprinkler Weather Service now listening on 0.0.0.0:3000 OpenSprinkler Weather Service now listening for local weather stream Loaded baseline ETo data.Is there anything specific beside the GOOGLE_MAPS_API_KEY I should consider when creating the container?
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Comments, Suggestions, Requests › Weather Service Docker Error