1
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 5 years have passed since last update.

DockerでAWScloud9もどきを構築した話

Last updated at Posted at 2020-04-19

windowsの開発環境を整えるのは難しいし、あんまり汚したくない。でもmacは持っていないという人(私)のためにcloud9環境を整える。

この記事のメリット

・AWScloud9(ぽい)がタダで使用できるようになる。
・環境構築を0からやるよりはやりやすい。

環境のイメージ

image.png

Dockerを使える前提で進める

file構成

./
├docker-compose.yml
└Dokcerfile

docker-compose.yml
version: "3"

services:
  cloud9:
    build:
      context: "."
    ports:
      - "8181:8181"
      - "8000:8000" #必須ではない
    command: "node /c9sdk/server.js -w /c9sdk/workspace --port 8181 --listen 0.0.0.0 --auth usr:passwd"

Dockerfile.
FROM amazonlinux:latest

RUN yum groupinstall -y development #c

RUN curl -sL https://rpm.nodesource.com/setup_10.x | bash -

RUN yum install -y git development glibc-static which nodejs #cloud9-sdkを立てるための必要最低限のモジュール
RUN git clone https://github.com/c9/core.git /c9sdk && cd /c9sdk && scripts/install-sdk.sh #cloud9-sdkを立てる

RUN mkdir /c9sdk/workspace

WORKDIR /c9sdk/workspace

EXPOSE 8181

実行コマンド

docker-compose up -d --build

ブラウザーからhttps:(仮想マシンIP):8181に接続

完成図

2020-04-19 (1).png

感想

使い捨てのlinuxPCが手に入った感じ。満足。vimを使わなくて済む。

ついでに

djangoの起動を試してみた。いい感じ。
2020-04-19_LI (2).jpg

参考にした記事

「cloud9をwindowsにインストールして、幸せになる」https://qiita.com/naniwaKun/items/b7b45a6e6ed33ce81eb9
「DockerでCloud9」https://qiita.com/fkmt-disk/items/8715e964e1e672b59454

1
0
2

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
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?