mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 17:59:31 +02:00
Container: Copy files to stable path, add ecs backwards compatibility
Copy captcha scripts to stable path for referencing in compose files: /usr/local/bin/ which is included in $PATH For backwards compatibility with ecs, link: /opt/ -> /home/ /usr/local/bin/ -> /opt/ejabberd/bin/ Copy sql files to stable path for referencing: /opt/ejabberd/sql/ For backwards compatibility with ecs, copy also to /opt/ejabberd/database/ ecs image implemented this in ejabberdctl since 2019: edb0373fd0ae0b24807a41ba2c3bf04b5b514844 Keep SQL init scripts in container (#42)
This commit is contained in:
parent
e761b22c61
commit
9f28098d04
1 changed files with 9 additions and 0 deletions
9
.github/container/Dockerfile
vendored
9
.github/container/Dockerfile
vendored
|
@ -137,6 +137,11 @@ RUN home_root_dir=$(echo $HOME | sed 's|\(.*\)/.*|\1 |') \
|
||||||
ARG UID
|
ARG UID
|
||||||
RUN chown -R $UID:$UID $HOME
|
RUN chown -R $UID:$UID $HOME
|
||||||
|
|
||||||
|
ARG VERSION
|
||||||
|
RUN cp /rootfs/$HOME-$VERSION/lib/captcha*.sh usr/local/bin/
|
||||||
|
RUN mkdir $HOME/sql \
|
||||||
|
&& find /rootfs/$HOME-$VERSION/lib/ -name *.sql -exec cp {} $HOME/sql \; -exec cp {} $HOME/database \;
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#' METHOD='direct' - Remove erlang/OTP & rebar3
|
#' METHOD='direct' - Remove erlang/OTP & rebar3
|
||||||
FROM docker.io/erlang:${OTP_VSN}-alpine AS runtime-direct
|
FROM docker.io/erlang:${OTP_VSN}-alpine AS runtime-direct
|
||||||
|
@ -167,6 +172,10 @@ ARG HOME
|
||||||
RUN addgroup $USER -g $UID \
|
RUN addgroup $USER -g $UID \
|
||||||
&& adduser -s /sbin/nologin -D -u $UID -h /$HOME -G $USER $USER
|
&& adduser -s /sbin/nologin -D -u $UID -h /$HOME -G $USER $USER
|
||||||
|
|
||||||
|
RUN ln -fs /usr/local/bin/ /opt/ejabberd/bin
|
||||||
|
RUN rm -rf /home \
|
||||||
|
&& ln -fs /opt /home
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#' Build together production image
|
#' Build together production image
|
||||||
FROM scratch AS prod
|
FROM scratch AS prod
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue