0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

#GCP ( Google Cloud Platform ) を Centos に build する #docker image ( Dockerfile ) の例

Last updated at Posted at 2019-04-04

./Dockerfile

# https://cloud.google.com/sdk/docs/quickstart-redhat-centos

FROM centos

COPY . ./

# vim is just for only your interactive mode operation 
RUN yum install -y vim sudo && \
  cp ./google-cloud-sdk.repo /etc/yum.repos.d/ && \
  sudo yum install -y google-cloud-sdk

ENTRYPOINT /bin/bash

./google-cloud-sdk.repo

[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

exe

docker build . -t your-gcp
docker run -it your-gcp

その後 gcloud init するなりして利用

Original by Github issue

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?