Merge branch 'devops/docker-image-user-repair' into 'dev'

Docker Repair | Remove ubuntu user to replace with crafty user

See merge request crafty-controller/crafty-4!826
This commit is contained in:
Iain Powrie 2025-01-20 14:22:45 +00:00
commit 615c661144
2 changed files with 11 additions and 9 deletions

View File

@ -1,21 +1,19 @@
# Changelog
## --- [4.4.7] - 2024/TBD
### New features
TBD
## --- [4.4.7] - 2024/01/20
### Bug fixes
TBD
### Tweaks
TBD
### Lang
TBD
- Docker Repair | Remove ubuntu user to replace with crafty user ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/826)) Resolves #521
<br><br>
## --- [4.4.6] - 2024/01/20
## NOTE Version effected by non-root docker issue if you installed from this version see [RCA document](https://gitlab.com/crafty-controller/crafty-4/-/issues/521#:~:text=Users%20deploying%20after%204.4.4)
### Bug fixes
- Fix traceback on stats page for data missing data.get ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/824))
<br><br>
## --- [4.4.5] - 2024/01/19
## NOTE Version effected by non-root docker issue if you installed from this version see [RCA document](https://gitlab.com/crafty-controller/crafty-4/-/issues/521#:~:text=Users%20deploying%20after%204.4.4)
### Refactor
- Refactor and standardize all JSON validator errors returning human readable translations ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/786))
- Improve docker-build CI/CD, supporting nightly builds ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/813))

View File

@ -5,8 +5,12 @@ ENV DEBIAN_FRONTEND="noninteractive"
# Security Patch for CVE-2021-44228
ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true
# Remove shipped sudoer user (Required for Ubuntu 24.04 base) MR !826
# Create non-root user & required dirs
RUN useradd -g root -M crafty \
RUN touch /var/mail/ubuntu \
&& chown ubuntu /var/mail/ubuntu \
&& userdel -r ubuntu \
&& useradd -g root -M crafty \
&& mkdir /crafty \
&& chown -R crafty:root /crafty