Skip to content
This repository was archived by the owner on Sep 13, 2022. It is now read-only.
This repository was archived by the owner on Sep 13, 2022. It is now read-only.

Running appstart_devappserver_base docker image fails #24

Description

@johnmartel

After running appstart init, running appstart run ./app.yaml fails at the step of starting the dev_appserver container because somehow, the python dev_appserver.py step of appstart/devappserver_init/das.sh still needs the app-engine-python component.

From what I can tell, this is due to path mismatches in both the Dockerfile and das.sh. Locally, I simply made sure the paths were the same everywhere and hardcoded the path to dev_appserver.py since the find | head -1 was returning a bogus entry from .install/.backup.

Here's the diff to my solution:

diff --git a/appstart/devappserver_init/Dockerfile b/appstart/devappserver_init/Dockerfile
index d791796..e94aec2 100644
--- a/appstart/devappserver_init/Dockerfile
+++ b/appstart/devappserver_init/Dockerfile
@@ -17,7 +17,8 @@ FROM debian
 RUN apt-get update
 RUN apt-get install -y python curl python-pip
 RUN curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash > install.sh
-RUN bash ./install.sh --disable-prompts --install-dir ./sdk
-RUN SDK_ROOT=$(echo /sdk/$(ls sdk/)); $(echo $SDK_ROOT/bin/gcloud components update --quiet preview app app-engine-python app-engine-php app-engine-java)
+RUN mkdir -p /sdk
+RUN bash ./install.sh --disable-prompts --install-dir /sdk
+RUN /sdk/google-cloud-sdk/bin/gcloud components update --quiet preview app app-engine-python app-engine-php app-engine-java
 ADD ./das.sh /
 ENTRYPOINT /das.sh
diff --git a/appstart/devappserver_init/das.sh b/appstart/devappserver_init/das.sh
index d90fe41..7270463 100755
--- a/appstart/devappserver_init/das.sh
+++ b/appstart/devappserver_init/das.sh
@@ -1,6 +1,7 @@
-SDK_ROOT=/sdk/$(ls /sdk/)
+SDK_ROOT=/sdk/google-cloud-sdk
 export PYTHONPATH=$SDK_ROOT/lib/
-python $(find $SDK_ROOT -name dev_appserver.py | head -1) \
+
+python /sdk/google-cloud-sdk/bin/dev_appserver.py \
     --allow_skipped_files=False \
     --api_host=0.0.0.0 \
     --api_port=$API_PORT \

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions