Kate
1 year ago
committed by
GitHub
8 changed files with 64 additions and 37 deletions
@ -1,5 +1,9 @@ |
|||||||
#!/bin/bash |
#!/bin/bash |
||||||
set -euxo pipefail |
set -euxo pipefail |
||||||
cd "$(dirname "$0")/.." |
cd "$(dirname "$0")/.." |
||||||
|
source tool/common.sh |
||||||
|
|
||||||
docker build -t nextcloud-neon-dev -f - ./tool < tool/Dockerfile.dev |
tag="$(image_tag "dev:latest")" |
||||||
|
|
||||||
|
# shellcheck disable=SC2046 |
||||||
|
docker buildx build --tag "$tag" $(cache_build_args "$tag") -f - ./tool < tool/Dockerfile.dev |
||||||
|
@ -0,0 +1,22 @@ |
|||||||
|
#!/bin/bash |
||||||
|
set -euxo pipefail |
||||||
|
|
||||||
|
function image_tag() { |
||||||
|
name="$1" |
||||||
|
echo "ghcr.io/${GITHUB_REPOSITORY:-nextcloud/neon}/$name" |
||||||
|
} |
||||||
|
|
||||||
|
function cache_build_args() { |
||||||
|
tag="$1" |
||||||
|
build_args=("--cache-from" "type=registry,ref=$tag") |
||||||
|
if [ -v GITHUB_REPOSITORY ]; then |
||||||
|
build_args+=( |
||||||
|
"--push" |
||||||
|
"--cache-to" "type=registry,ref=$tag,mode=max" |
||||||
|
) |
||||||
|
else |
||||||
|
build_args+=("--load") |
||||||
|
fi |
||||||
|
|
||||||
|
echo "${build_args[*]}" |
||||||
|
} |
@ -1,8 +1,9 @@ |
|||||||
#!/bin/bash |
#!/bin/bash |
||||||
set -euxo pipefail |
set -euxo pipefail |
||||||
cd "$(dirname "$0")/.." |
cd "$(dirname "$0")/.." |
||||||
|
source tool/common.sh |
||||||
|
|
||||||
./tool/build-dev-container.sh |
./tool/build-dev-container.sh |
||||||
|
|
||||||
echo "Running development instance on http://localhost. To access it in an Android Emulator use http://10.0.2.2" |
echo "Running development instance on http://localhost. To access it in an Android Emulator use http://10.0.2.2" |
||||||
docker run --rm -v nextcloud-neon-dev:/usr/src/nextcloud -v nextcloud-neon-dev:/var/www/html -p "80:80" --add-host=host.docker.internal:host-gateway nextcloud-neon-dev |
docker run --rm -v nextcloud-neon-dev:/usr/src/nextcloud -v nextcloud-neon-dev:/var/www/html -p "80:80" --add-host=host.docker.internal:host-gateway "$(image_tag "dev:latest")" |
||||||
|
@ -1,4 +1,6 @@ |
|||||||
#!/bin/bash |
#!/bin/bash |
||||||
set -euxo pipefail |
set -euxo pipefail |
||||||
|
cd "$(dirname "$0")/.." |
||||||
|
source tool/common.sh |
||||||
|
|
||||||
docker exec -it "$(docker ps | grep nextcloud-neon-dev | cut -d " " -f 1)" /bin/bash -c "php -f occ notification:test-push $*" |
docker exec -it "$(docker ps | grep "$(image_tag "dev:latest")" | cut -d " " -f 1)" /bin/bash -c "php -f occ notification:test-push $*" |
||||||
|
Loading…
Reference in new issue