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
Hamamatsu.js #4 ES6 playground by Docker
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
jacoyutorius
August 03, 2018
Programming
340
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
Transcript
25 slides
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
More Decks by jacoyutorius
See All by jacoyutorius
AWS SAM × Ruby で快適に Lambdaファンクションを開発するためのいくつかのTips
jacoyutorius
0
160
Amplify Gen 2 Authentication では Cognito IdentityPool のみでのゲストユーザーへの認可ができない件
jacoyutorius
0
250
kamalでRailsアプリを Amazon Lightsailにデプロイするぞ!
jacoyutorius
1
530
オープンデータとAWSで作っている 浜松市イベントカレンダー
jacoyutorius
0
340
浜松市オープンデータを使ってイベントカレンダーアプリを作りました
jacoyutorius
0
140
Amplifyアプリを 任意のタイミングでデプロイするぞ!
jacoyutorius
1
540
AWS Amplify で翻訳アプリを作った話とAmplifyからカジュアルにCloudWatchLogsにログを送る方法について
jacoyutorius
1
1.6k
AWS App Runner + copilot cli
jacoyutorius
1
1.4k
AWS App Runner + Copilot CLI
jacoyutorius
0
150
Other Decks in Programming
See All in Programming
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
170
オーケストレーション記述言語 Katari
yukikurage
0
250
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
260
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
330
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
980
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
310
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
250
Seven New Principles of Software Engineering
yegor256
0
490
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
210
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.7k
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
850
Featured
See All Featured
Building AI with AI
inesmontani
PRO
1
1.4k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
520
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
300
For a Future-Friendly Web
brad_frost
184
11k
Navigating Team Friction
lara
192
16k
The SEO Collaboration Effect
kristinabergwall1
1
620
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
ラッコキーワード サービス紹介資料
rakko
5
5.8M
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Side Projects
sachag
456
43k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Practical Orchestrator
shlominoach
192
12k