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
VS Code Meetup 〜Remote Developmentと Dockerで快適W...
Search
Noriyuki TAKEI
December 18, 2019
Technology
430
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
VS Code Meetup 〜Remote Developmentと Dockerで快適Web開発〜
Noriyuki TAKEI
December 18, 2019
More Decks by Noriyuki TAKEI
See All by Noriyuki TAKEI
魔法少女がClaude Codeを監視する / ccportal-deck
noriyukitakei
0
620
魔法少女がClaude Codeを監視する / ccportal-deck
noriyukitakei
3
200
ラズパイ×ローカルLLMで“MAGIシステム”を作る 〜3体のAIによる合議制マルチエージェント〜/magibypi
noriyukitakei
0
170
ループエンジニアリングでE2Eテストを実践
noriyukitakei
0
560
第50回 Tokyo Jazug Night/react-deepdive
noriyukitakei
0
110
RAG構築のためのAzure OpenAI Serviceリファレンスアーキテクチャ詳解/wakarimiragarchitecture
noriyukitakei
0
350
生成AI時代の検索手法〜スターウォーズの登場人物で紐解くベクトル/セマンティック/ハイブリッド検索〜/wakarimiaisearch
noriyukitakei
0
140
Prompt flowでブログ記事紹介ツイートアプリをラクチン開発/wakarimipromptflow
noriyukitakei
0
90
世界一わかりみの深いAzure OpenAI Service/wakarimiaoai
noriyukitakei
1
970
Other Decks in Technology
See All in Technology
AIエージェント時代、Kaggleにどう取り組むか
takanao
2
470
AIがGISを代替する日:〜すべてをAIが創る時代に、私たちがFOSS4Gに関わる意味〜
lehupa
0
190
Adversary Infrastructure Hunting101
disconinja
0
190
渡米前の準備を制す!re:Invent 2026徹底準備術 / The Ultimate Preparation Guide for re:Invent 2026
yuj1osm
1
490
Maestro MCPとClaude Code Skillsによる自律的なE2Eテスト支援
asmz
0
400
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
530
「作れる」と「リリースできる」の間にあったもの── PdMを外して見えた、PdMがやるべき仕事/Buildable ≠ Shippable: What Removing the PM Taught Me About the PM’s Job
yappli_developers
0
420
クラウドエージェントの先駆け Devin。今も最先端を走る、他との違い
kinopeee
1
540
Patterns in AI Driven Software Development
akosma
PRO
0
430
(swiftc) NonCopyableとライフタイム修飾子
teamhimeh
0
160
AX時代の自治体支援リソース再配分と役割分担の再構成:戦略とロードマップ(概要)
sishi2026
0
170
バックオフィスに染み出すTypeScript ── clasp で安全に仕組みを作る
nealle
1
160
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
The Invisible Side of Design
smashingmag
301
52k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
450
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
310
First, design no harm
axbom
PRO
2
1.4k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.5k
BBQ
matthewcrist
90
10k
Producing Creativity
orderedlist
PRO
348
41k
A Soul's Torment
seathinner
8
3.9k
Transcript
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
〜Remote Developmentと Dockerで快適Web開発〜 技術部 2019年12⽉18⽇ 武井 宜⾏ サイオステクノロジー株式会社
© SIOS Technology, Inc. All rights Reserved. About me 2
Internal Only BCPVUNF Noriyuki TAKEI Ҫ ٓߦ Information • サイオステクノロジー株式会社 • クラウドネイティブアプリケーション • 千葉県在住 Favorites • Azure • Squash • Sweets blog https://tech-lab.sios.jp/ core skill Azure Kubernetes Service Azure Bot Service
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
3 Internal Only みなさん、 Visual Studio Codeの Remote Development 使ってますか︖
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
4 Internal Only リモートサーバー上のコードを直接編集が可能 SSHで接続可能なリモートサーバーやコンテナ、WSL上に あるファイルをVisual Studio Codeから直接編集できる Remote Developmentとは︖ 拡張機能をリモートサーバーにインストールし、 リモートサーバー上で動作させることが可能
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
5 Internal Only 開発エンジニア GitHub Jenkins Docker hubなどの Dockerレポジトリ Kubernetes 開発エンジニアが ソースをコミット します。 GitHubのwebhookの機能を 使って、Jenkinsの特定のURL を叩きます。 Docker使うとCI/CD的にウレシイ
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
6 Internal Only 開発エンジニア GitHub Jenkins Docker hubなどの Dockerレポジトリ Kubernetes Dockerイメージ Docker使うとCI/CD的にウレシイ webhookをトリガーにしてJenkins が起動する。まずはじめに、ソース コードをgit pullします。 Dockerのコマンドで、ビルドしたア プリケーションを含むDockerイメー ジを作成します。
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
7 Internal Only 開発エンジニア GitHub Jenkins Docker hubなどの Dockerレポジトリ Kubernetes Docker使うとCI/CD的にウレシイ DockerイメージをDockerレポジト リにプッシュします。 webookでステージング環境の特定 のURLが叩かれたことをトリガーに して、Dockerリポジトリから Dockerイメージをpullします。
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
8 Internal Only Remote Developmentがないとどうなるの︖ Apache PHP ソースコード Dockerコンテナ Docker Engine OS ソースコード PC 同期 Visual Studio Code デバッグ Xdebug 編集
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
9 Internal Only Remote Developmentがないとどうなるの︖
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
10 Internal Only Remote Developmentがあると…(^o^) Apache PHP ソースコード Dockerコンテナ Docker Engine OS PC Visual Studio Code デバッグ 編集 Xdebug
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
11 Internal Only Remote Developmentがあると…(^o^)
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
12 Internal Only インストールは ラクチン
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
13 Internal Only Remote Developmentを可能にする拡張機能をインストールします。左 部メニュー最下部にあるアイコン(四⾓が4つ並んでいるもの)をクリックし、 「remote development」と⼊⼒し、Remote Developmentの拡張機能 をインストールします。
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
14 Internal Only Visual Studio Codeで、PHPのデバッグが可能になる拡張機能をインストール します。左下の緑のボタンをクリックして下さい。
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
15 Internal Only これだけ
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
16 Internal Only これから 簡単なPHPアプリを Dockerコンテナ上で デバッグします。
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
17 Internal Only Dockerfile docker-compose.yml html index.php xdebug xdebug.ini .devcontainer devcontainer.json → テスト⽤のスクリプト → xdebugの設定ファイル → コンテナの設定ファイル ファイル構成は以下のとおりです。
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
18 Internal Only # Apache上でPHPが動くDockerイメージを取得 FROM php:7.3.8-apache # xdebugの設定をコンテナにコピー ADD xdebug/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini # xdebugのインストール RUN pecl install xdebug && docker-php-ext-enable xdebug %PDLFSGJMF
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
19 Internal Only version: '3' services: php: build: . ports: - '8080:80ʼ # ローカルのhtmlディレクトリをコンテナの/var/www/htmlにマウント volumes: - ./html:/var/www/html EPDLFSDPNQPTFZNM
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
20 Internal Only // なんの変哲もないただのPHPスクリプト <?php $a = 1; if ($a === 1) { echo "hoge"; } else { echo "fuga"; } ?> IUNMJOEFYQIQ
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
21 Internal Only # リモートデバッグ接続先です。今回はサーバー側にXdebugが動くので、 # 127.0.0.1を指定します。 xdebug.remote_host = 127.0.0.1 # リモートデバッグを⾃動で開始します。 xdebug.remote_autostart = 1 # リモートデバッグを有効にします。 xdebug.remote_enable = 1 # リモートデバッグの接続ポートです。 xdebug.remote_port = 9000 YEFCVHJOJ
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
22 Internal Only { # 任意の名前 "name": "Existing Docker Compose (Extend)", # Remoteでログインしたいコンテナを作成するためのdocker compose "dockerComposeFile": [ "../docker-compose.yml", ], # 先程指定したdocker composeファイル内に定義しているサービスで # 起動したいもの "service": "php", # コンテナに⼊ったときに下記のディレクトリにcdします。 "workspaceFolder": "/var/www/html", # コンテナが⽣成されたときにインストールする拡張機能です。 # これを指定しないと、コンテナが再⽣成すると拡張機能が消えます。 "extensions": ["felixfbecker.php-debug"] } EFWDPOUBJOFSEFWDPOUBJOFSKTPO
© SIOS Technology, Inc. All rights Reserved. VS Code Meetup
23 Internal Only Dockerコンテナ内部 のTerminalにすでに ログイン状態のものが 表⽰されます。 デバッグできます。
© SIOS Technology, Inc. All rights Reserved. さいごに 24 Internal
Only 本資料の内容は 以下のブログで公開しています。 技術ブログ「SIOS TECH.LAB」 https://tech-lab.sios.jp/
© SIOS Technology, Inc. All rights Reserved. さいごに 25 Internal
Only 先⽉発売のSoftware Designの Azure特集に執筆しました。