Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
DockerでAngular開発
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
rayyyy
January 11, 2019
500
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DockerでAngular開発
rayyyy
January 11, 2019
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
630
The Cult of Friendly URLs
andyhume
79
7k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
820
Chasing Engaging Ingredients in Design
codingconduct
0
360
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Building Adaptive Systems
keathley
44
3.2k
Amusing Abliteration
ianozsvald
1
350
Paper Plane
katiecoart
PRO
5
54k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
380
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Marketing to machines
jonoalderson
1
5.9k
Transcript
DockerでAngular開発 エイチーム新卒2年 ナバロ ライ
ココに立つまで ・いろいろな勉強会に興味あり ・LTも挑戦したい! ・学生の頃、Angular 2をめちゃくちゃ触った (現在のバージョン 7)
Angularをインストールするか
・・・
ローカルを汚したくないな
Docker環境でやろう
Docker環境構築得意な人〜✋
は〜い✋
成果物 GitHub https://github.com/rayyyy/angular-docker
Docker環境 要件 ・Angularや必要なコマンドはコンテナ内で実行 ・動作確認はブラウザでできるように ・コンテナ内のファイルはローカルのエディタで編集
Docker環境構築の流れ 1. Dockerfileの作成 2. docker-compose.ymlの作成 3. 便利なMakefile作成
Dockerfile 作成 FROM node:11.6.0 as build_env RUN npm install -g @angular/cli
WORKDIR /root/my-app # コンテナ内のファイルはローカルのエディタで編集するために # ローカルのファイルをコンテナ内のワーキングスペースにコピー COPY . /root/my-app/
docker-compose.yml 作成 version: '3.7' services: web_dev: build: context: . target: build_env
tty: true # 処理が終わってもコンテナが終了しないように ports: - "4200:4200" # ローカルでの動作確認用 volumes: - .:/root/my-app # コンテナのフォルダをローカルにマウントする
Dockerfile 作成 $ docker-compose up -d $ docker-compose exec web_dev bash
Makefile
all: rm build up ps build: docker-compose build --no-cache up:
docker-compose up -d --build exec: docker-compose exec web_dev bash Makefile 作成 ps: docker ps -a && echo "\n" docker-compose ps rm: docker-compose stop docker-compose rm -f
$ make up イコール $ docker-compose up -d
Angular環境完成したのでプロジェクト作成 $ docker-compose up -d or make up $ docker-compose
exec web_dev bash or make exec root@71ca9dfb0e43:~/my-app# ng new myApp root@71ca9dfb0e43:~/my-app# cd myApp/ root@71ca9dfb0e43:~/my-app/myApp# ng serve --host 0.0.0.0 http://localhost:4200/
None
Netlifyでデプロイ&ホスティング 詳しくは書きませんが GitHubと連携するとすぐデプロイできます。 初心者なのでこれぐらいしかまだわかっていませんが 便利そうです
ご清聴ありがとうございました