Compare commits

...

10 Commits

Author SHA1 Message Date
9f1e6b3fc4 update to 10.11 2025-12-18 10:57:36 -05:00
1ffea485ff Merge pull request 'insert busybox into distroless container' (#7) from build-test into main
Reviewed-on: #7
2025-12-18 15:52:56 +00:00
a7ffa1b072 cleanup 2025-12-15 20:16:47 -05:00
c4d2fd1db2 document distroless busybox workaround 2025-12-15 20:11:58 -05:00
9fcf98eb0d add busybox rm to cleanup 2025-12-15 20:08:32 -05:00
81b09e4fe0 working 2025-12-15 19:48:27 -05:00
5f9d7c7172 10.5.14 update 2025-12-10 20:30:10 -05:00
a86f3f5072 updated to 10.5.14 instead of most recent to avoid distroless image 2025-12-10 16:51:08 -05:00
4a06fb29ee update custom entrypoint launch command 2025-12-10 14:36:59 -05:00
86189220c1 update to 10.11 2025-12-10 14:19:45 -05:00
6 changed files with 28 additions and 7 deletions

View File

@ -87,5 +87,8 @@ This is how to configure your Mattermost server to accept logins from your Authe
- `abra app deploy YOURAPPNAME`
# Technical Notes
This recipe inserts a statically-compiled busybox binary from `busybox:1.25-uclibc` into the distroless container, to allow running the custom entrypoint shell script which configures Mattermost.
[`abra`]: https://git.coopcloud.tech/coop-cloud/abra
[`coop-cloud/traefik`]: https://git.coopcloud.tech/coop-cloud/traefik

View File

@ -1,5 +1,6 @@
export ENTRYPOINT_VERSION=v1
export ENTRYPOINT_VERSION=v3
export MATTERMOST_CONFIG_VERSION=v1
export SHELL_VERSION=v1
reset_config() {
cp /config-to-copy.json /mattermost/config/config.json && touch /mattermost/config/CoopCloudManaged

BIN
bin/busybox Executable file

Binary file not shown.

View File

@ -2,4 +2,4 @@ version: "3.8"
services:
app:
image: mattermost/mattermost-enterprise-edition:10.5.0
image: mattermost/mattermost-enterprise-edition:10.11

View File

@ -2,7 +2,7 @@ version: "3.8"
services:
app:
image: mattermost/mattermost-team-edition:10.5.0
image: mattermost/mattermost-team-edition:10.11
environment:
- TZ
- MM_SQLSETTINGS_DRIVERNAME=postgres
@ -28,11 +28,14 @@ services:
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=2.1.0+10.5.0"
- "coop-cloud.${STACK_NAME}.version=2.2.0+10.11"
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
- "backupbot.backup=true"
- "backupbot.backup.path=/mattermost,/etc/ssl"
configs:
- source: busybox
target: /bin/busybox
mode: 0555
- source: abra_mattermost_entrypoint
target: /abra-mattermost-entrypoint.sh
mode: 0555
@ -69,6 +72,9 @@ configs:
abra_mattermost_entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: ./entrypoint.sh
busybox:
name: ${STACK_NAME}_busybox_${SHELL_VERSION}
file: ./bin/busybox
networks:

View File

@ -1,4 +1,13 @@
#!/bin/sh
#!/bin/busybox sh
/bin/busybox mkdir /tmp/bin
export PATH=$PATH:/tmp/bin
/bin/busybox ln -s /bin/busybox /tmp/bin/ln
ln -s /bin/busybox /tmp/bin/cat
ln -s /bin/busybox /tmp/bin/echo
ln -s /bin/busybox /tmp/bin/cp
ln -s /bin/busybox /tmp/bin/touch
ln -s /bin/busybox /tmp/bin/rm
set -e
if test -f "/run/secrets/postgres_password"; then
pwd=`cat /run/secrets/postgres_password`
@ -21,5 +30,7 @@ if ! test -f "/mattermost/config/CoopCloudManaged"; then
cp /config-to-copy.json /mattermost/config/config.json && touch /mattermost/config/CoopCloudManaged
fi
# https://github.com/mattermost/mattermost-server/blob/master/build/Dockerfile
/entrypoint.sh "mattermost"
rm -rf /tmp/bin
# https://github.com/mattermost/mattermost/blob/master/server/build/Dockerfile
/mattermost/bin/mattermost