LoginSignup
1
1

More than 3 years have passed since last update.

Docker で ubuntu vim python aws gcp あたりの開発環境を作る

Last updated at Posted at 2019-09-19

google-cloud-sdk.list を作成

deb http://packages.cloud.google.com/apt cloud-sdk-bionic main

Dockerfile

FROM ubuntu:18.04

RUN apt-get -y update
RUN apt-get -y install software-properties-common
RUN yes | add-apt-repository ppa:jonathonf/vim
RUN apt-get -y update
RUN apt-get -y install zsh
RUN chsh -s /usr/bin/zsh 
RUN /usr/bin/zsh
RUN apt-get -y install git docker python vim neovim
RUN apt-get install -y python3.7
RUN apt-get install -y python-pip
RUN pip install --upgrade pip
RUN yes|pip install awscli
RUN apt-get install -y curl

RUN export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
RUN echo $CLOUD_SDK_REPO
COPY google-cloud-sdk.list /etc/apt/sources.list.d/google-cloud-sdk.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
RUN apt-get -y update
RUN apt-get install -y google-cloud-sdk
RUN yes no|gcloud init

WORKDIR /root

run.sh

docker build -t hoge_dev .
docker stop hoge_dev_con
docker rm hoge_dev_con
docker run -v /Users/hogehoge/.config/gcloud:/root/.config/gcloud -v /Users/hogehoge/.aws:/root/.aws -it --name hoge_dev_con hoge_dev:latest /usr/bin/zsh

メモ

eval `ssh-agent`
1
1
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
1
1