MSR in Alpine Docker
-
Just updated the first post.
I just noticed that Reactor time wasn't correct, and its probably because of daylight savings time here in Norway.
I put a Bind mount for/etc/localtime
in the docker-compose, and noW it will follow the host machines time. -
Hi Patrick,
Do you have a compose file that you're happy with. I'd like to try this on my HA machine which has several other containers, and runs on an Intel Atom with 4gb ram.
-
To those dreading ssh into their machine, try using WinSCP and setting the file editor to Notepad ++. Makes editing linux files a breeze and you can set up your folder structures and permissions with the winscp gui.
-
toggledbitsreplied to Buxton on Mar 8, 2021, 8:47 PM last edited by toggledbits Mar 8, 2021, 3:49 PM
@buxton said in MSR in Alpine Docker:
Do you have a compose file that you're happy with.
Here's what I last used:
version: '3' services: web: container_name: reactor environment: REACTOR_DATA_PREFIX: /var/reactor image: toggledbits/reactor:latest restart: always network_mode: "bridge" expose: - 8111 ports: - 8111:8111 volumes: - .data:/var/reactor tmpfs: /tmp
To those dreading ssh into their machine, try using WinSCP and setting the file editor to Notepad ++. Makes editing linux files a breeze and you can set up your folder structures and permissions with the winscp gui.
If you're on an RPi (or really anything, but RPi was a breeze), setting up Samba and being able to open the files directly on the host via the share is a great time saver, too. Choices.
-
@perh said in MSR in Alpine Docker:
and not it will follow the host machines time.
@PerH I'm re-reading this... the bind mount fixes it, right? You meant "now"?
-
Yes.
My MSR Container clock was one hour off, and the bind fixed it. -
Ok got the following error:
Pulling MSR (toggledbits/reactor:latest)...
ERROR: pull access denied for toggledbits/reactor, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
-
It's not a published image. The only image I make available is for Synology NAS x86. You'll need to build your own image using the generic package download (which you can get from the download button in the MantisBT bug tracker).
Have you built docker images before?
-
Yes, I've built some simple ones. I'll need a Mantis login though. Let me know what kind of info you need to set up my credentials.
-
OK. Just PM me your full name and email address.
-
I'm happy to see an official docker image for MSR!
Just thought i'd share my docker-compose.yaml, which is only different in that i use docker volume instead of bind to host folder
Not sure if it's better, but i've done this to all dockers in my system.
This came up working well immediately, next is to stop the container and add my storage and config data.
version: "3.9" services: MSR: container_name: MSReactor restart: always image: toggledbits/reactor:latest-generic-amd64 ports: - "8111:8111" networks: # Optional for use of static IP inside the docker network. HAnett: # You could replace this and the subsequent lines with " network_mode: "bridge" " ipv4_address: 192.168.0.8 volumes: - type: volume source: MSR target: /var/reactor - "/etc/localtime:/etc/localtime:ro" environment: - TZ=Europe/Oslo - REACTOR_DATA_PREFIX=/var/reactor tmpfs: /tmp logging: driver: "json-file" options: max-file: "5" max-size: 2m networks: #Optional HAnett: name: HAnett driver: bridge ipam: config: - subnet: 192.168.0.0/16 gateway: 192.168.0.254 volumes: MSR: name: MSR
-
Nice work there! I'm going to save a copy even though I routinely use the Docker GUI (perhaps not available to all Synology NAS users) to set up MSR.
I, too, have been mulling the difference between
bind
andvolume
and Googling a while back did not seem to settle it for me. Surely it must make some difference?!Also, I gotta ask: Do you have any Sunrise/Sunset-based Rules? Only asking b/c for me, in 21117, my only Sunset/offset routine somehow failed to launch itself last night, but I'm uncertain whether that constitutes a 'bug' or just a misfire of some other kind.
-
I think the main advantage of volumes is that location is controlled by docker, and these locations aren't as easy to screw up if you mess around with the folder structure.. It also puts all volumes in a common folder (var/lib/docker/volumes) that can be copied to a tar or backup folder using one line, but thats just as easy if you organize bind folders the same way.. Let me know if you find other advatages.
I have no sunrise/sunset rules, i use light sensors for i.e. outside lighting.. I think about 90% of my "MSR bugs" have been PEBCAC, so check your logic.
-
T toggledbits locked this topic on Dec 31, 2021, 9:46 PM