ddvk / rmfakecloud

host your own cloud for the remarkable
GNU Affero General Public License v3.0
751 stars 61 forks source link

[unRAID] Docker "CMD" not found #225

Closed ncsufan8628 closed 1 year ago

ncsufan8628 commented 1 year ago

Hello,

Trying to run this dockerized version on my unRAID server. I've successfully run the container and gotten it setup, however, I am never able to get a console within the container itself, as it seems /bin/sh and /bin/bash are missing.

Am I missing something or a way to access this container's command prompt? I am looking to do this so I can ensure the logs are on a remote share that my fail2ban instance can access to protect the rmfakecloud.

# docker exec -ti rmfakecloud /bin/bash
OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown
Eeems commented 1 year ago

The docker container only contains rmfakecloud and any required files, you won't be able to run a command prompt inside it: https://github.com/ddvk/rmfakecloud/blob/master/Dockerfile#L15

ncsufan8628 commented 1 year ago

Do you know the path within the container where the log file is stored or if I can pass an argument to the container to specify where the logs are stored?

nemunaire commented 1 year ago

Logs are printed on stdout/stderr, they are not written to any file.

You can see them through docker logs -f rmfakecloud.

Eeems commented 1 year ago

https://github.com/ddvk/rmfakecloud/blob/master/docs/install/fail2ban.md

Eeems commented 1 year ago

Logs are just written to stdout/stderr, they aren't written to a file. You'd need a custom entrypoint to redirect them to a file.

ncsufan8628 commented 1 year ago

Thanks will look over those docs. Was following this documentation and didn't see this info there.

https://ddvk.github.io/rmfakecloud/

ncsufan8628 commented 1 year ago

Thanks for everyone's help - I managed to get it working, although its probably not the most elegant method and as a relative newbie there are probably better ways.

For anyone else on unraid. I had to configure the container template to use a docker syslog driver via --log-driver syslog --log-opt syslog-address=udp://SERVER_ADDRESS:PORT within my template's Extra Parameters section. Once I enabled Unraid's syslog server, I was now getting the rmfakecloud container to output to something my fail2ban container could read. From there, I can easily pass that file to my fail2ban container.

I am guessing due to unraid the fail2ban jail.conf posted at those instructions will not work since dockers in unraid are not writing to the same journal as docker within a typical linux system most likely would.

If anyone has a more elegant way of accomplishing this or is familiar with unraid, I'm all ears.

ddvk commented 1 year ago

just for completeness, you can force the generation of a logfile with RM_LOGFILE env variable,

ncsufan8628 commented 1 year ago

thank you! Way simpler & worked perfectly