Browse Source

tool,nextcloud: Use host network

pull/458/head
jld3103 1 year ago
parent
commit
ba309aa965
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 9
      packages/nextcloud/test/helper.dart
  2. 2
      tool/dev.sh

9
packages/nextcloud/test/helper.dart

@ -155,11 +155,12 @@ Future<DockerContainer> getDockerContainer(final DockerImage image) async {
'run',
'--rm',
'-d',
'-p',
'$port:80',
'--add-host',
'host.docker.internal:host-gateway',
'--net',
'host',
image,
'php',
'-S',
'0.0.0.0:$port',
],
);
// 125 means the docker run command itself has failed which indicated the port is already used

2
tool/dev.sh

@ -5,4 +5,4 @@ cd "$(dirname "$0")/.."
./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"
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" --net="host" nextcloud-neon-dev

Loading…
Cancel
Save