[英]Where will I find the source code for Google App Engine Flexible environment?
I want to download the source code in my Python 3 App Engine flexible environment.我想在我的 Python 3 App Engine 柔性环境中下载源代码。 I see how you can SSH in, or go in from the terminal, to look at source code.
我了解您如何通过 SSH 登录或从终端进入以查看源代码。 But I don't want to turn debug on a production machine.
但我不想在生产机器上打开调试。 Instead, is it possible to just list the files, and then download to my machine?
相反,是否可以只列出文件,然后下载到我的机器上?
The app was uploaded using Docker, pushed to gcr.io, and deployed with gcloud app deploy
.该应用程序使用 Docker 上传,推送到 gcr.io,并使用
gcloud app deploy
进行部署。
I managed to copy the source code from the App Engine Flex environment by following these steps:我通过以下步骤设法从 App Engine Flex 环境中复制了源代码:
Fetch the App Engine image to be used by performing either the following:通过执行以下任一操作来获取要使用的 App Engine 映像:
appengine
appengine
gcloud container images list --repository [region]/[project-name]/appengine
in Cloud Shellgcloud container images list --repository [region]/[project-name]/appengine
Supported regions:支持地区:
gcr.io
us.gcr.io
eu.gcr.io
asia.gcr.io
Create a container using Docker:使用 Docker 创建容器:
docker create --name=gae-source [region]/[project-name]/appengine/[service].[version]:[tag]
It would be easier to copy the full repository name then add the tags
afterwards by clicking the copy复制完整的存储库名称然后通过单击复制添加
tags
会更容易button beside the repository name or
service.version
.存储库名称或
service.version
旁边的按钮。
Copy the files from the docker container:从 docker 容器中复制文件:
docker cp gae-source:/app . --follow-link
Check if the files are successfully copied:检查文件是否复制成功:
ls ./app
Compress the files by performing:通过执行压缩文件:
tar -czvf app.tar.gz ./[folder]
You may now download the compressed file on your local machine.您现在可以在本地计算机上下载压缩文件。
I managed to view the source code by using the Cloud Shell Editor.我设法使用 Cloud Shell Editor 查看了源代码。 I didn't have to download the files.
我不必下载文件。
You can check this Github link that I followed.你可以查看我关注的这个Github 链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.