-
Notifications
You must be signed in to change notification settings - Fork 29
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
Workflow build Docker image with arm64,amd64 #124
Conversation
Add entrypoint.sh, start with custom UserID/GroupID Rework docker-compose Rework dockerfile
Only mapping the data directory and not the entire cabernet folder will cause problems. The recommendation is to map the entire cabernet source folder to /app. There are multiple reasons for this. Here are two:
I notice you also removed the mapping for /root/.cabernet/key.txt from the docker compose file. This will cause problems for people who have turned on encryption. This file is where the cryptography key is stored when your turn on the cabernet "use_encryption" option. If this file is not mapped via a docker volume or bind mount it will be lost when a new docker image of cabernet is pulled. When you lose this key, cabernet will fail because it will not be able to decrypt the encrypted data after the docker image pull. |
Agree with cookieisland. encryption key MUST be mounted in a volume and not be lost. If it is lost, anything encrypted would not be useable. Also, the entire Cabernet source must also be mounted in a volume due to the way Docker handles updates. |
Also, the hostname called "your-ip" is required to have a space. I do not care if its called your ip, my ip, their ip or ip address, it must contain a space. This is to handle those with no brain cells that think "your-ip" is an actual hostname. I had a issue written up on this and now require a space in the hostname area. |
Note that when you switch users from root to cabernet that will likely change the location of the encryption key.txt file. People using the current docker container which runs as the root have their encryption key located at "/root/.cabernet/key.txt" |
Backward compatibility for old key.txt path Additional documentation provided on README.md
New commit addressing PR issues Changes
That is incorrect, like a said before the app shouldn't (never) be upgraded inside the container, instead user should update the docker image and restart the container, otherwise will cause issues with the container.
That was already documented on README and
You should change your documentation each time a user don't properly read it. PS: The app shouldn't never run as root, specially web-apps or remote access, that's a security risk for the user, and ca be used for privilege escalation |
Looks really good. Thanks for the updates. Still reviewing the changes, but have one question. The app does not support adhoc updates to the Cabernet source. As an example, if someone were to overlay a different version of cabernet, the app does not try to fix or patch the database or config file to support the version extracted. This means docker upgrades would not apply the patches for the upgrade unless docker also changed the maintenance flag in the config.ini to True. Then the system would apply any patches required to run on the new version. How did you keep the webui from doing the upgrade? And, how does the software respond? Does it throw exceptions? Concerned that it will also keep the plugins from being able to upgrade... |
Applying PR to dev branch for testing. |
* max bandwidth changes * max bandwidth changes * max bandwidth changes * max bandwidth changes * Workflow build Docker image with arm64,amd64 (#124) * Workflow build Docker image with arm64,amd64 Add entrypoint.sh, start with custom UserID/GroupID Rework docker-compose Rework dockerfile * Volumes provided for data Backward compatibility for old key.txt path Additional documentation provided on README.md * Dokcerfile install with pip requirements.txt * Fix key.txt permissions * Minor changes to Docker files * Update Dockerfile * Update docker-compose.yml * Update docker-compose.yml * Corrections for backups and upgrades --------- Co-authored-by: Generator <[email protected]>
Summary
Notes
You can use single Dockerfile, other files are reluctant.
However is possible to update the app within the container, is recommended for the user update the image instead.
Won't be possible to build for arm(32bit) due to python cryptography system requirements.
Additional files or directories to include on docker must be added to .dockerignore (ex:
!filename.ext
!somedir/
)Docker images tested on x86-64 and arm64 (Raspberry Pi 4)