Browse Source

tool: Add the version of apps to the dockerfile to rebuild on updates

pull/206/head
jld3103 2 years ago
parent
commit
b33a976706
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 4
      tool/Dockerfile.dev
  2. 8
      tool/update.sh

4
tool/Dockerfile.dev

@ -11,8 +11,8 @@ RUN ./occ app:disable password_policy
RUN OC_PASS="user1" ./occ user:add --password-from-env --display-name "User One" user1 RUN OC_PASS="user1" ./occ user:add --password-from-env --display-name "User One" user1
RUN OC_PASS="user2" ./occ user:add --password-from-env --display-name "User Two" user2 RUN OC_PASS="user2" ./occ user:add --password-from-env --display-name "User Two" user2
RUN ./occ app:install news RUN ./occ app:install news # 20.0.0
RUN ./occ app:install notes RUN ./occ app:install notes # 4.6.0
RUN ./occ app:enable password_policy RUN ./occ app:enable password_policy
# TODO: This stopped working randomly with apache not being able to bind to the port during build. Must be some docker changes? # TODO: This stopped working randomly with apache not being able to bind to the port during build. Must be some docker changes?

8
tool/update.sh

@ -24,10 +24,12 @@ elif [ -d "external/nextcloud-$1" ]; then
git reset --hard "$latest_tag" git reset --hard "$latest_tag"
git submodule update git submodule update
# shellcheck disable=SC2001
latest_version=$(echo "$latest_tag" | sed "s/^v//")
if [[ "$1" == "server" ]]; then if [[ "$1" == "server" ]]; then
# shellcheck disable=SC2001 sed -i "s/FROM nextcloud:.*/FROM nextcloud:$latest_version/" ../../tool/Dockerfile.dev
image_version=$(echo "$latest_tag" | sed "s/^v//") else
sed -i "s/FROM nextcloud:.*/FROM nextcloud:$image_version/" ../../tool/Dockerfile.dev sed -i "s/RUN \.\/occ app:install $1 .*/RUN .\/occ app:install $1 # $latest_version/" ../../tool/Dockerfile.dev
fi fi
) )
else else

Loading…
Cancel
Save