自定义云环境以永久包含程序包 [英] Customizing the cloud environment to include a package permanently

查看:64
本文介绍了自定义云环境以永久包含程序包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用一些软件包,方法是在云外壳中使用sudo apt-get命令安装它们.但是现在我想使其永久化.我在外壳中收到了此消息

I have been using some packages by installing them using the sudo apt-get command in the cloud shell. But now I want to make it permanent. I got this message in the shell

You are running apt-get inside of Cloud Shell. Note that your Cloud Shell
machine is ephemeral and no system-wide change will persist beyond session end.

You can customize your environment to permanently include this package by
updating your environment at https://cloud.google.com/console/cloudshell/environment/view.

那么如何自定义云环境以永久包含程序包?

So how to customize the cloud environment to include a package permanently?

推荐答案

您有几种选择.

1)每次启动Cloud Shell时,请重新安装所有内容.这听起来很糟糕,但是如果您将文件保存在GCS上,则复制会非常快.

1) Reinstall everything each time you launch Cloud Shell. This sounds bad but if you keep your files on GCS, the copy happens very fast.

2)Cloud Shell是Docker容器.您可以修改该容器,以便使用您自定义的容器启动Cloud Shell.启动Cloud Shell.右侧标题栏中是一个看起来像笔记本电脑的图标.点击它.这将打开一个窗口,其中包含有关配置Docker容器的详细信息.

2) Cloud Shell is a Docker container. You can modify that container so that you launch Cloud Shell using your customized container. Launch Cloud Shell. In the title bar on the right hand side is a icon that looks like a laptop. Click it. This will open a window with details on configuring the Docker container.

3)将所有内容保留在主目录本地.您的主目录树是持久性的,每次重新创建Cloud Shell VM时都会还原.

3) Keep everything local to your home directory. You home directory tree is persistent and will be restored each time your Cloud Shell VM is recreated.

这篇关于自定义云环境以永久包含程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆