-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors in Docker version #47
Comments
FWIW - I decided to try to build my own Docker image for the project until Sean gets a chance to update his image (if he decides to do so.) It seems to work fine as long as the
CLI
Docker Compose (my preferred method)
Feel free to ping me if you have any questions (or spot any issues). |
Hey there,Thank you for sending this. I am in the military and deployed right now but will be back next week. I will look at all of what you have posted when I return. I don’t have a stable connection to test where I am at though. Thank you,Sean ***@***.*** from my iPhoneOn Nov 4, 2023, at 9:09 AM, Roddie Hasan ***@***.***> wrote:
FWIW - I decided to try to build my own Docker image for the project until Sean gets a chance to update his image (if he decides to do so.)
It seems to work fine as long as the /server/index.js workaround described on the repo is done. It's fairly basic and I'm sure doesn't follow any Docker best practices, but it works.
FROM node:18-alpine
RUN mkdir /home/node/app
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
WORKDIR /home/node/app
COPY --chown=node:node pi-weather-station/package*.json ./
USER node
RUN npm install
COPY --chown=node:node pi-weather-station/. .
EXPOSE 8080
CMD [ "npm", "start" ]
Put the above commands in a file names Dockerfile in a build directory.
git clone https://github.com/elewin/pi-weather-station.git in that directory
Apply the server/index.js workaround mentioned above.
Run: docker build -t weather-station:0.0.1 . in the build directory.
Run the container using your preferred method:
CLI
docker run -itd --name weather-station -p 8080:8080 -v -v appdata:/app weather-station:0.0.1
Docker Compose (my preferred method)
version: '3'
services:
weather-station:
image: weather-station:0.0.1
container_name: weather-station
ports:
- "8080:8080"
volumes:
- appdata:/app
restart: unless-stopped
volumes:
appdata:
Feel free to ping me if you have any questions (or spot any issues).
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi there,
Thanks for an excellent project!
Issues are disabled on @SeanRiggs' repo, so I'm posting this here. I'm trying to run the Docker version of the repo on a Raspberry Pi 4, but I get this error:
My Docker Compose file is:
I can run pi-weather-station natively on the Pi and it works fine.
The text was updated successfully, but these errors were encountered: