Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Hamamatsu.js #4 ES6 playground by Docker
Search
jacoyutorius
August 03, 2018
Programming
320
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Hamamatsu.js #4 ES6 playground by Docker
Hamamatsu.js #4の発表資料です。
jacoyutorius
August 03, 2018
More Decks by jacoyutorius
See All by jacoyutorius
AWS SAM × Ruby で快適に Lambdaファンクションを開発するためのいくつかのTips
jacoyutorius
0
140
Amplify Gen 2 Authentication では Cognito IdentityPool のみでのゲストユーザーへの認可ができない件
jacoyutorius
0
220
kamalでRailsアプリを Amazon Lightsailにデプロイするぞ!
jacoyutorius
1
460
オープンデータとAWSで作っている 浜松市イベントカレンダー
jacoyutorius
0
320
浜松市オープンデータを使ってイベントカレンダーアプリを作りました
jacoyutorius
0
120
Amplifyアプリを 任意のタイミングでデプロイするぞ!
jacoyutorius
1
520
AWS Amplify で翻訳アプリを作った話とAmplifyからカジュアルにCloudWatchLogsにログを送る方法について
jacoyutorius
1
1.6k
AWS App Runner + copilot cli
jacoyutorius
1
1.3k
AWS App Runner + Copilot CLI
jacoyutorius
0
120
Other Decks in Programming
See All in Programming
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
1
3.3k
Claude Team Plan導入・ガイド
tk3fftk
0
250
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
17k
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
240
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
200
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
9
5.9k
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
510
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
130
霧の中の代数的エフェクト
funnyycat
1
450
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
170
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.6k
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
990
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
250
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.2k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Un-Boring Meetings
codingconduct
0
360
The Limits of Empathy - UXLibs8
cassininazir
1
570
Why Our Code Smells
bkeepers
PRO
340
58k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.7k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
450
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
500
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
119
120k
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
Docker / ES2015 sandbox 2018.8.3 Hamamatsu.js #4 @jacoyutorius ͱΓ͋͑ͣDockerͰWebαʔόʔΛཱͯͯjsΛॻ͍ͯΈΔ
Yuto Ogi FOURIER.Inc Ruby, Rails, Javascript, Vue.js, AWS Hamamatsu.rb JAWS-UG
Hamamatsu @jacoyutoirus
Contents ES2015ͷ৽ػೳΛࢼ͢ڥΛDockerͰ࡞Δ
Contents Docker v18.06 / Kitematic Editor
Purpose खܰʹWebαʔόʔΛཱ͍ͯͨ ϩʔΧϧʹΠϯετʔϧͨ͠Webαʔόʔઃఆมߋ͕໘ ԾϚγϯىಈ͕͍ ͦΖͦΖDocker͍ͬͱ͔͘ɾɾɾ .htmlϑΝΠϧΛʹ։͘ͱCORSͷ੍ݶʹҾ͔͔ͬΔ
Dockerfile FROM nginx MAINTAINER jacoyutorius <
[email protected]
> USER root RUN apt-get
update
docker-compose ෳͷ%PDLFSΠϝʔδΛҰׅཧͰ͖Δɻ
docker-compose version: "3" services: webserver: build: context: "./" image: nginx
ports: - "5000:80"
docker-compose up $ docker-compose up Creating network "hmjs4_default" with the
default driver Creating hmjs4_webserver_1 ... done Attaching to hmjs4_webserver_1 webserver_1 | 172.22.0.1 - - [02/Aug/2018:14:01:33 +0000] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Kitematic/0.13.0 Chrome/ 45.0.2454.85 Electron/0.35.4 Safari/537.36" "-" webserver_1 | 172.22.0.1 - - [02/Aug/2018:14:01:34 +0000] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/ 537.36" "-" webserver_1 | 2018/08/02 14:01:35 [error] 8#8: *2 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 172.22.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost: 5500", referrer: "http://localhost:5500/" webserver_1 | 172.22.0.1 - - [02/Aug/2018:14:01:35 +0000] "GET /favicon.ico HTTP/1.1" 404 571 "http:// localhost:5500/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36" "-"
Kitematic
localhost:5000
docker-compose up -d %BFNPOϞʔυɻόοΫάϥϯυͰ%PDLFS͕ىಈ͢Δɻ
docker-compose exec EPDLFSDPNQPTFFYFDXFCTFSWFSCJOCBTI ·ͨɺ
html/index.html <html> <head></head> <body> <h1>Hello!</h1> </body> </html>
docker-compose up version: "3" services: webserver: build: context: "./" image:
nginx volumes: - “./html:/usr/share/nginx/html” ports: - "5000:80"
localhost:5000
html/js/script.js window.onload = () => { const p = document.createElement("p")
p.innerText = "How are you?" document.body.appendChild(p) }
html/index.html <html> <head></head> <body> <h1>Hello!</h1> <script type=“module” src=“/js/script.js”></script> </body> </html>
localhost:5000
html/js/modules/greet.js export default (name) => { return `How are you?
${name}` }
html/js/script.js import greet from “/js/libs/greet.js" window.onload = () => {
const p = document.createElement("p") p.innerText = greet("yuto") document.body.appendChild(p) }
localhost:5000
tree . ᵓᴷᴷ Dockerfile ᵓᴷᴷ docker-compose.yml ᵋᴷᴷ html ᵓᴷᴷ index.html
ᵋᴷᴷ js ᵓᴷᴷ libs ᴹ ᵋᴷᴷ greet.js ᵋᴷᴷ script.js
ES2015 Arrow Function String literal module
end Arrow Function String literal module