我正在构建一个 google-cloud-sdk 基础映像,并试图保持它的精简。
ARG GCLOUD_SDK_VERSION=285.0.1-alpine
FROM google/cloud-sdk:$GCLOUD_SDK_VERSION
# Install Java 8 for Datastore emulator
RUN apk add --update --no-cache \
openjdk8-jre
RUN gcloud components install \
cloud-datastore-emulator \
pubsub-emulator \
beta \
--quiet
...
Run Code Online (Sandbox Code Playgroud)
到目前为止一切都很好。当我构建并查看gcloud components install命令的输出时,我充满信心:
????????????????????????????????????????????????????
? These components will be installed. ?
????????????????????????????????????????????????????
? Name ? Version ? Size ?
????????????????????????????????????????????????????
? Cloud Datastore Emulator ? 2.1.0 ? 18.4 MiB ?
? Cloud Pub/Sub Emulator ? 2019.09.27 ? 34.9 MiB ?
? gcloud Beta Commands …Run Code Online (Sandbox Code Playgroud)