Skip to content
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

CumulsMX docker on Opewrt as docker host #10

Open
Triglia118 opened this issue May 5, 2022 · 7 comments
Open

CumulsMX docker on Opewrt as docker host #10

Triglia118 opened this issue May 5, 2022 · 7 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Triglia118
Copy link

Hi, I'm trying to create the docker image using openWRT as docker host. During docker image creation I get some errors and I cannot proceed:

`Processing triggers for dbus (1.12.20-2ubuntu4) ...
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:5 https://ppa.launchpadcontent.net/nginx/stable/ubuntu jammy InRelease
Err:6 https://ppa.launchpadcontent.net/nginx/stable/ubuntu jammy Release
404 Not Found [IP: 91.189.95.85 443]
Reading package lists...
E: The repository 'https://ppa.launchpadcontent.net/nginx/stable/ubuntu jammy Release' does not have a Release file.
Repository: 'deb https://ppa.launchpadcontent.net/nginx/stable/ubuntu/ jammy main'
Description:
This PPA contains the latest Stable Release version of the nginx web server software.

Only Non-End-of-Life Ubuntu Releases are supported in this PPA

Development releases of Ubuntu are not officially supported by this PPA, and uploads for those will not be available until actual final releases for those versions
More info: https://launchpad.net/~nginx/+archive/ubuntu/stable
Adding repository.
Adding deb entry to /etc/apt/sources.list.d/nginx-ubuntu-stable-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/nginx-ubuntu-stable-jammy.list
Adding key to /etc/apt/trusted.gpg.d/nginx-ubuntu-stable.gpg with fingerprint 8B 3981E7A6852F782CC4951600A6F0A3C300EE8C
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:4 https://ppa.launchpadcontent.net/nginx/stable/ubuntu jammy InRelease
Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease
Err:6 https://ppa.launchpadcontent.net/nginx/stable/ubuntu jammy Release
404 Not Found [IP: 91.189.95.85 443]
Reading package lists...
E: The repository 'https://ppa.launchpadcontent.net/nginx/stable/ubuntu jammy Release' does not have a Release file.
The command '/bin/bash -c apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:nginx/stable && apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* && echo "\ndaemon o ff;" >> /etc/nginx/nginx.conf && chown -R www-data:www-data /var/lib/nginx' re turned a non-zero code: 100`

could you help me? thank you

@optoisolated
Copy link
Owner

Hi. Yes I've noticed this myself; i think it's due to the Ubuntu build ive put in the Dockerfile. I'm testing some changes now and should be able to publish a fix shortly.

@optoisolated
Copy link
Owner

I've updated the Dockerfile. Do you want to give it another go?

@optoisolated optoisolated self-assigned this May 5, 2022
@optoisolated optoisolated added the bug Something isn't working label May 5, 2022
@optoisolated optoisolated added this to the Testing milestone May 5, 2022
@Triglia118
Copy link
Author

Triglia118 commented May 5, 2022

OK, I made a further step, but cannot finalize the docker image creation. Here follows the new error message:

`Step 19/23 : RUN curl -L $(curl -s https://api.github.com/repos/cumulusmx/CumulusMX/releases/latest | grep browser_ | cut -d" -f4) --output /tmp/CumulusMX.zip && mkdir /opt/CumulusMX && mkdir /opt/CumulusMX/publicweb && unzip /tmp/CumulusMX.zip -d /opt && chmod +x /opt/CumulusMX/CumulusMX.exe

---> Running in 868314ee02e5
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 6415k 100 6415k 0 0 3632k 0 0:00:01 0:00:01 --:--:-- 6238k

mkdir: cannot create directory '/opt/CumulusMX': File exists
The command '/bin/bash -c curl -L $(curl -s https://api.github.com/repos/cumulusmx/CumulusMX/releases/latest | grep browser_ | cut -d" -f4) --output /tmp/CumulusMX.zip && mkdir /opt/CumulusMX && mkdir /opt/CumulusMX/publicweb && unzip /tmp/CumulusMX.zip -d /opt && chmod +x /opt/CumulusMX/CumulusMX.exe' returned a non-zero code: 1`

@optoisolated
Copy link
Owner

Give that another go. I've updated the Dockerfile with some fixes to accomodate the new Cumulus ZIP Files.

@Triglia118
Copy link
Author

Hi, solved. It works perfectly! Thank you very much for your time. I changed some settings in docker run command: I'm using a macvlan network to reach my containers from outside via OpenVpn. I also changed the TZ, to match Italian time. Now I'm trying to configure Cumulus: I'm new to it. I'll let you know my progress, if you want. Greetings from Italy, and hope for better peaceful time.

@optoisolated
Copy link
Owner

Awesome news mate :) Yeah, I've been a bit slack lately keeping this repo up to date. Thanks for helping troubleshoot :)
Yeah I am definitely keen to see what changes you make to the Dockerfile to get the outcomes you need.
G'day from Australia :)

@optoisolated optoisolated modified the milestones: Testing, Closure May 5, 2022
@Triglia118
Copy link
Author

Hi I managed to configure CumuluMX: some observations and questions.
On the first run, I set up the wrong station by mistake in Cumulus. After that I haven't been able to change the settings: any changes seems to be written, but the config.ini in the mapped folder on the host doesn't change, even restarting the docker. So if I restart the docker, changes are lost. I had to recreate the docker to solve.
Now I'm testing the CumulusMX, up and running, but if I access the "data logs -> dayfile" gives an error: "DataTables warning: table id=dayfile - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1".
Don't know why. Data seems to be written correctly on the mapped folder: I can see in ../MXWeather/data that files are update about every minute.

About my settings: before creating the image, I simply changed TZ=Europe/Rome in ".Env" and "Dockerfile". I had to build the image step by step, using shell commands, because for some reasons the "build.sh" wasn't executable in OpenWRT shell, even if I set the execute permission.
After docker image creation, I switched to the dockerman GUI in OpenWRT (no more shell command here). And I created the MXWeather container with the following options:

Name: MXWeather
Image: ubuntu:MXWeather
Restart policy: Unless stopped
Mount/Volume mappings:
/opt/docker/volumes/MXWeather/data:/opt/CumulusMX/data
/opt/docker/volumes/MXWeather/backup:/opt/CumulusMX/backup
/opt/docker/volumes/MXWeather/log:/var/log/nginx
/opt/docker/volumes/MXWeather/MXdiags:/opt/CumulusMX/MXdiags
/opt/docker/volumes/MXWeather/config:/opt/CumulusMX/config
/opt/docker/volumes/MXWeather/publicweb:/opt/CumulusMX/publicweb

Env: TZ=Europe/Rome

Network: macvlan|192.168.30.6 (the macvlan network has been created before: I had it already for other containers in my system)
Long story short: with the default docker bridge network on OpenWRT, I cannot manage the firewall rules for the docker bridge interface: firewall rules are managed directly from the dockerman docker manager. This is good if you use docker in lan environment, but if you want to reach them from outside (i.e. via OpenVPN tunnel) you cannot use Iptables postrouting SNAT rules. They are bypassed by dockerman firewall management. So I decided to create a macvlan network for the dockers I want to use from outside. In this case the macvlan network behaves like a real network interface and I can manage firewall rules by myself.

Another question, I noticed that during docker image creation 2 different final images are generated: "ubuntu:20.04" and "ubuntu:MXWeather". Is the "ubuntu:20.04" used when MXWeather docker runs? Can I remove it?

Thank you very much for your time, It is great to experiment interesting stuff and cooperate from the opposite side of the world. Sorry for my poor English, as you can guess, it is not my primary language.
Ciao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants