Ich bin mit ionischen mit Docker und wenn ich versuche, die ionische Befehl auszuführen dienen, dass die App auf dem Browser ausführen ich habe diesen Fehler:Ionic Docker konnte nicht den Browser öffnen
[email protected]:/var/www/espaceproold# ionic serve
[INFO] Starting app-scripts server: --port 8100 --p 8100 --livereload-port 35729 --r 35729 --address 0.0.0.0 - Ctrl+C to
cancel
[13:54:41] watch started ...
[13:54:41] build dev started ...
[13:54:41] clean started ...
[13:54:41] clean finished in 7 ms
[13:54:41] copy started ...
[13:54:41] transpile started ...
[13:54:45] transpile finished in 3.50 s
[13:54:45] preprocess started ...
[13:54:45] deeplinks started ...
[13:54:45] deeplinks finished in 47 ms
[13:54:45] preprocess finished in 49 ms
[13:54:45] webpack started ...
[13:54:45] copy finished in 4.10 s
[13:54:55] webpack finished in 10.18 s
[13:54:55] sass started ...
[13:54:57] sass finished in 1.55 s
[13:54:57] postprocess started ...
[13:54:57] postprocess finished in 18 ms
[13:54:57] lint started ...
[13:54:57] build dev finished in 15.37 s
[13:54:57] watch ready in 15.48 s
[13:54:57] dev server running: http://localhost:8100/
[13:54:57] Failed to open the browser: Command failed: xdg-open "http://localhost:8100" /bin/sh: 1: xdg-open: not found
[13:55:00] lint finished in 3.41 s
Docker-Datei:
FROM ubuntu:16.04
MAINTAINER ""
# Install apt packages
RUN apt-get update && apt-get install -y git lib32stdc++6 lib32z1 curl openjdk-8-jdk-headless sendemail libio-socket-ssl-perl libnet-ssleay-perl && apt-get clean && rm -rf /var/lib/apt/lists/*
# Install android SDK, tools and platforms
RUN cd /opt && curl https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz -o android-sdk.tgz && tar xzf android-sdk.tgz && rm android-sdk.tgz
ENV ANDROID_HOME /opt/android-sdk-linux
RUN echo 'y' | /opt/android-sdk-linux/tools/android update sdk -u -a -t platform-tools,build-tools-23.0.3,android-23,extra-android-support,extra-google-m2repository,extra-android-m2repository
# accept the license agreements of the SDK components
RUN export ANDROID_LICENSES="$ANDROID_HOME/licenses" && \
[ -d $ANDROID_LICENSES ] || mkdir $ANDROID_LICENSES && \
[ -f $ANDROID_LICENSES/android-sdk-license ] || echo 8933bad161af4178b1185d1a37fbf41ea5269c55 > $ANDROID_LICENSES/android-sdk-license && \
[ -f $ANDROID_LICENSES/android-sdk-preview-license ] || echo 84831b9409646a918e30573bab4c9c91346d8abd > $ANDROID_LICENSES/android-sdk-preview-license && \
[ -f $ANDROID_LICENSES/intel-android-extra-license ] || echo d975f751698a77b662f1254ddbeed3901e976f5a > $ANDROID_LICENSES/intel-android-extra-license && \
unset ANDROID_LICENSES
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y -q \
nodejs \
gradle \
&& apt-get -y autoclean \
&& rm -rf /var/lib/apt/lists/*
# Install npm packages
RUN npm install -g ionic
RUN npm install -g cordova
# Setup environment
ENV ANDROID_HOME /opt/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
EXPOSE 8100 35729
Ist irgendetwas mit meiner dockerfile falsch? Oder was ist das Problem? danke im voraus!
Ihr ionic Server versucht, einen Browser auf einem Andockcontainer zu öffnen, in dem sich kein Browser befindet. Gibt es einen "Production" -Modus für ionische Systeme, der diese Öffnung auslässt? –
Vielen Dank für Ihre Antwort, aber ich frage mich, wie kann ich Google Chrome auf dem Container installieren? oder wie kann ich meine App lokal ausführen ??? –
Sie wollen das nicht tun, nur "ionische dienen - Nobrowser" in Container und überprüfen Sie können den Server von einem anderen Computer mit dem Browser dieses Computers erreichen. –