douyu0845
douyu0845
2017-05-17 10:34

在ssh会话中访问应用程序文件到谷歌应用程序引擎灵活?

已采纳

I'm setting up a PHP based Google App Engine Flexible Environment project and it would be much easier going for me (in terms of speed of progress) if I could access the PHP files that are running at /app in the SSH session that the Google Cloud Console so gracefully provides right in the web browser.

Unfortunately, there is no information that I can find pertaining to this. I can see the output of the mount command and it looks like a whole lot of paths are mounted, but none give a clue where my /app can be found:

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=191984,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=154052k,mode=755)
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=308100k)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,relatime,net_prio)
/dev/sda1 on /var/lib/docker/aufs type ext4 (rw,relatime,data=ordered)
none on /var/lib/docker/aufs/mnt/a8141f5169b6d62d3baeb5d0da713cdf77a2a5524ba492a579a8af9963f2aba4 type aufs (rw,relatime,si=5f839818bd3efaaa,dio,dirperm1)
shm on /var/lib/docker/containers/11aafe10a4269e66ffef7b09dd07d0793e1793bf17a287311e9cdc26bca39a25/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
proc on /run/docker/netns/b3fa6a6ae075 type proc (rw,nosuid,nodev,noexec,relatime)
none on /var/lib/docker/aufs/mnt/5b5758049ca6d6c65eddcffcc1d18be01d5337a0ccd27b9f7a80d417495ccf95 type aufs (rw,relatime,si=5f839818a368baaa,dio,dirperm1)
shm on /var/lib/docker/containers/08ba8f0c4ba4a1373f5c6723f4ed2b76c88994a9b5ef3f47dc100b833f39233d/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
proc on /run/docker/netns/b94901bac194 type proc (rw,nosuid,nodev,noexec,relatime)
none on /var/lib/docker/aufs/mnt/6fee2ea01a6311aaf32767351e2635e03d20c2bcdff3034bdf8145e672f1ab3e type aufs (rw,relatime,si=5f839818a32d5aaa,dio,dirperm1)
shm on /var/lib/docker/containers/8d81f94a6c7381323b8f8fb86fbc4546db03bdbc68cc537a0684be32773f921e/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
proc on /run/docker/netns/db581b9dfbd7 type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /mnt/app_volumes/mnt/ramdisk1 type tmpfs (rw,relatime,size=104448k)
none on /var/lib/docker/aufs/mnt/cd6c2ddbddf1a871e9e5da6b7ebe2515da0002829aca2fb9eb598b48c3c4ad8f type aufs (rw,relatime,si=5f839818a0d6baaa,dio,dirperm1)
shm on /var/lib/docker/containers/a16282fee594fc5d38ef3185b8442f15f16d2f496f49a5748536067ac3826840/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
proc on /run/docker/netns/f14af5f2d130 type proc (rw,nosuid,nodev,noexec,relatime)
none on /var/lib/docker/aufs/mnt/bf58f8c8520fb2113364cbd31709159c36f09bceff53239cd42e238ed53fd357 type aufs (rw,relatime,si=5f839818b97b5aaa,dio,dirperm1)
shm on /var/lib/docker/containers/e778b3781b6a8f4ab53bb925a9cd196da258c6e95c74c22eed029b2b3e4c7955/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
proc on /run/docker/netns/19a91926e87f type proc (rw,nosuid,nodev,noexec,relatime)

It looks like docker is in use to run my app, but I am unable to list containers, this is what I get back using $docker ps Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Suggestions, pointers would be much appreciated!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • dtyw10299 dtyw10299 4年前
    $ sudo docker exec -t -i gaeapp /bin/bash
    # Now you're in the app container!
    # apt-get update && apt-get -y install vim
    

    If you're using opcache, you may need to restart the php-fpm. You can restart everything by:

    # kill -HUP 1
    
    点赞 评论 复制链接分享