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
CircleCI 2.0 を使い倒そう / phpcon kansai 2018 circlc...
Search
TAKAHASHI Kunihiko
July 14, 2018
Technology
7
2.6k
CircleCI 2.0 を使い倒そう / phpcon kansai 2018 circlci docker
PHPカンファレンス関西 2018 CircleCI 2.0 を使い倒そうというタイトルでトークしたものです
TAKAHASHI Kunihiko
July 14, 2018
Tweet
Share
More Decks by TAKAHASHI Kunihiko
See All by TAKAHASHI Kunihiko
Apache から LiteSpeed に乗り換えてみませんか? / php-conference-japan-2019-track5-hello-litespeed
kunit
1
1.4k
Webアプリケーションエンジニアだった私がホスティング事業に興味を持った理由 / Fukuoka UIJ Turn gmo pepabo
kunit
0
450
アプリケーションエンジニアな私がホスティング業界に来て感じたあれこれ / ChugokuDB Vol27
kunit
0
550
Google App Engine PHP 7.2 を試してみる #phpstudy / google app engine php 7.2
kunit
1
910
独立したコアレイヤパターンをためしてみる / try independent core layer pattern
kunit
3
920
PHPのバージョンアップについてあれこれ / luncers lunch study 3 php version up
kunit
0
2.1k
CircleCI の歩き方 / CircleCI #phpstudy
kunit
2
250
CircleCI 2.0 をつかってみよう / CircleCI #phpcondo2017
kunit
0
660
Docker for Mac/Winってどうなの? / #fukuokaphp docker for mac and win
kunit
0
190
Other Decks in Technology
See All in Technology
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
210
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.3k
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
290
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
500
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Happy Clients
brianwarren
98
6.7k
Code Review Best Practice
trishagee
64
17k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Navigating Team Friction
lara
183
14k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Done Done
chrislema
181
16k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Agile that works and the tools we love
rasmusluckow
327
21k
Transcript
$JSDMF$* Λ͍ͦ͏ QIQDPOGFSFODF,BOTBJ LVOJU
ࣗݾհ ✓ !LVOJU ✓ߴڮ ✓OFDPNPSJ--$ ✓ʮ1)1ϚχϡΞϧΛಡ͏ʯQPEDBTU ✓IUUQQIQNBOVBMOFDPNPSJBTJB ✓QIQPOEPD ✓ฌݿݝग़
Կ͓͍ͯ ✓ݱࡏɺདྷͷ$BLF'FTUΛͲ͜Ͱ։࠵͢ Δ͔ͱ͍͏։࠵ͷථ͕ߦΘΕ͍ͯ·͢ ✓ͦͷީิʹͳΜͱຊؚ͕·Ε͓ͯΓ·͢ ͷͰͥͻօ͞ΜථΛ͓ئ͍͠·͢ʂ ✓IUUQTDBLFGFTUPSH ✓ථʹ.Z$BLF1)1αΠτͷొ ͕ඞཁͱͳΔͷͰͦͷ͚͓ͩؾΛ͚ͭͩ͘ ͍͞ʂ
ͦͦ$*ͱ ✓8JLJQFEJB͞ΜʹΑΕ ✓$POUJOVPVT*OUFHSBUJPOͷུ ✓ܧଓతΠϯςάϨʔγϣϯ ✓ओʹϓϩάϥϚʔͷΞϓϦέʔγϣϯ࡞࣌ͷ ࣭վળೲظͷॖͷͨΊͷश׳ͷ͜ͱͰ͋Δɻ ΤΫετϦʔϜɾϓϩάϥϛϯά 91 ͷϓϥΫ ςΟεͷҰͭͰɺڱٛʹϏϧυςετɺΠϯ
εϖΫγϣϯͳͲΛܧଓతʹ࣮ߦ͍ͯ͘͜͠ͱΛ ҙຯ͢Δ
݁ہ$*ͬͯͳʹ͢Μͩʁ ✓ԿΒ͔ͷτϦΨʔΛड͚ͯ ✓ܾΊΒΕͨॲཧΛߦ͏
τϦΨʔͱͳΔͷ ✓(JU)VCʹίʔυΛ QVTIͨ͠ͱ͖ʹىಈ ✓ܾΊΒΕͨ࣌ؒʹىಈ ✓खಈͰىಈ
࣮ߦ͢Δॲཧྫ ✓ඞཁͳϥΠϒϥϦͷΠϯετʔϧ ✓DPNQPTFSJOTUBMMతͳ ✓ίʔσΟϯάελΠϧνΣοΫ ✓߹ʹΑͬͯίʔυϑΥϚοτ͔͚ͯ͠·͏ ✓จ๏νΣοΫ ✓ίϯύΠϧϦϯΫ 1)1Ͱͳ͍͚Ͳ ✓ςετ
୯ମ&& ✓σϓϩΠ
$JSDMF$*ʹ͍ͭͯ ✓ͱͱ͍͏όʔδϣϯҧ͍ͷαʔϏ ε͕͋Δ ✓དྷ݄ ʹऴྃ͢Δ ✓͍͠ͱ͍͏ΛΑ͘ฉ͘ ✓͍ͭ࠷ۙ$JSDMF$*+BQBO͕Ͱ͖ͯɺࠓ πΠολʔͰઈࢍΤΰαʔν͞ΕͯΔͷͰɺ ࣭ͨ͠Β͙͢ʹ৯͍͍ͭͯΒ͑Δ͔Βνϟ
ϯεʂ
͞ΑͳΒ$JSDMF$* ✓6CVOUVͰͭ͘ΒΕͨશ෦ೖΓͷ7.্Ͱ ςετΛߦ͏ ✓QIQFOW͕ΘΕ͍ͯͯඞཁʹԠͯ͡όʔ δϣϯΛΓସ͑Δ ✓.Z42-3FEJTඞཁʹԠͯ͑͡Δ ✓σϑΥϧτͷڍಈ͕͋ΓɺͦΕΛͦͷ·· ͑ྑ͍ͷͰ͋Εઃఆ͕͋·Γඞཁͳ͔ͬͨ ✓ͳΕͨਓ͔Β͢Δͱͱͯ؆୯
Α͏ͦ͜$JSDMF$* ✓ಉ༷ͷ7.ϕʔεͷॲཧͰ͖Δ͕ਪ͞Εͯͳ ͍ ✓ਪ͞ΕΔͷ%PDLFSΠϝʔδΛ͏ͷ ✓%PDLFSͷ͕ࣝඞཁͱͳΔͷͰ֮͑Δ͜ͱ͕૿͑ ͨ ✓.Z42-3FEJTΛ͔ͭ͏ͳΒɺͦΕ༻ͷ %PDLFSΠϝʔδΛ͏ඞཁ͕͋Δ ✓Θ͔ͬͯ͠·͑ɺԿ͔ίϯτϩʔϧͰ͖ΔͷͰ ศརͳͷ͕ͩɺ֮͑Δ͜ͱ͕૿͑ͨͷͰͱ͖ͬͭʹ͍͘
͍͠ͱ͍͍ͬͯΔͻͱ͕ଟ͍
$JSDMF$*ͷར༻ྉۚʁ ✓ແྉ͕͋Δͷͬͯ͠·ͨ͠ʁ ✓ίϯςφ ✓ฒྻ࣮ߦͰ͖ͳ͍ ✓݄·ͰॲཧՄೳ ✓ຊ֨తʹ͏ͱ͍͍ײ͡ʹ͍Δ࣌ؒ ✓ରϦϙδτϦ࣮ߦϢʔβ͕ෳͰ͍͍ ✓ϓϥΠϕʔτϦϙδτϦͰ͍͍ ✓ฒྻɺ࣮ߦίϯςφʹԠͯ͡՝ۚ͞ΕΔ ✓ίϯςφ૿͢͝ͱʹ݄
✓·ͩҰൠެ։͞Εͯͳ͍͕ɺैྔ՝ۚϓϥϯՃ͞ΕΔ༧ఆ
$JSDMF$*Ͱͷಈ࡞Πϝʔδ ✓%PDLFSΠϝʔδΛऔಘ͠ɺίϯςφΛىಈ ✓ىಈͨ͠ίϯςφ্ʹιʔεΛHJUDMPOF ✓ىಈͨ͠ίϯςφ্ͰDPNQPTFSJOTUBMMΛ࣮ߦ ✓ىಈͨ͠ίϯςφ্ͰQIQDTΛͬͯίʔσΟϯά ελΠϧνΣοΫ ✓ىಈͨ͠ίϯςφ্Ͱ1IBOΛͬͯ੩తղੳͯ͠จ ๏νΣοΫ ✓ىಈͨ͠ίϯςφ্Ͱ1)16OJUΛͬͯ୯ମςετ ✓͜͜·Ͱͷॲཧ͕ޭ͔ͨ͠Ͳ͏͔ΛTMBDLʹ௨
$JSDMF$*ͱͷ࿈ܞํ๏ ✓ઃఆϑΝΠϧɺϦϙδτϦͷτο ϓʹDJSDMFDJͱ͍͏σΟϨΫτ ϦΛ࡞ΓɺͦͷதʹDPOpHZNM ͱ͍͏ϑΝΠϧΛஔ͘ͱͦΕΛͬ ͯ$*͕࣮ߦ͞ΕΔ ✓DPOpHZNMͷॻ͖ํΛ؆୯ʹ આ໌͍͖ͯ͠·͢
DJSDMFDJDPOpHZNM version: 2 jobs: build: docker: - image: circleci/php:7.1-apache-browsers -
image: circleci/mysql:5.7 steps: - checkout - restore_cache: keys: - composer-{{ arch }}—{{ checksum "composer.lock" }} - run: composer install - save_cache: key: composer-{{ arch }}—{{ checksum "composer.lock" }} paths: - ~/.composer/cache - run: ./vendor/bin/phpcs —standard=PSR2 ./app - run: mkdir ~/phpunit - run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml - store_test_results: path: ~/phpunit - store_artifacts: path: ~/phpunit
DJSDMFDJDPOpHZNM ✓ઃఆ͢ΔηΫγϣϯ ✓KPCT ✓ෳͷδϣϒΛઃఆ͢Δ ✓XPSLqPXT ✓ෳͷδϣϒΛͲͷΑ͏ʹ࣮ߦ ͢Δ͔Λઃఆ͢Δ
DJSDMFDJDPOpHZNM version: 2 jobs: build: docker: - image: circleci/php:7.1-apache-browsers -
image: circleci/mysql:5.7 steps: - checkout - restore_cache: keys: - composer-{{ arch }}—{{ checksum "composer.lock" }} - run: composer install - save_cache: key: composer-{{ arch }}—{{ checksum "composer.lock" }} paths: - ~/.composer/cache - run: ./vendor/bin/phpcs —standard=PSR2 ./app - run: mkdir ~/phpunit - run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml - store_test_results: path: ~/phpunit - store_artifacts: path: ~/phpunit
KPCT ✓δϣϒΛઃఆ͢Δ δϣϒෳ͋ͬͯྑ͍ ✓δϣϒ໊ ௨ৗCVJMEͱ͍͏໊લʹ͢Δ ✓ޙ΄Ͳग़ͯ͘ΔXPSLqPXͰ༻͢Δ ✓FYFDVUPSΛઃఆ ✓EPDLFS
✓NBDIJOF ಉ༷ͷ7.ڥ ✓NBDPT ✓TUFQTͰࡉ͔͍࣮ߦ༰Λઃఆ͢Δ
DJSDMFDJDPOpHZNM version: 2 jobs: build: docker: - image: circleci/php:7.1-apache-browsers -
image: circleci/mysql:5.7 steps: - checkout - restore_cache: keys: - composer-{{ arch }}—{{ checksum "composer.lock" }} - run: composer install - save_cache: key: composer-{{ arch }}—{{ checksum "composer.lock" }} paths: - ~/.composer/cache - run: ./vendor/bin/phpcs —standard=PSR2 ./app - run: mkdir ~/phpunit - run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml - store_test_results: path: ~/phpunit - store_artifacts: path: ~/phpunit
TUFQT ✓DIFDLPVU ✓ιʔεΛDIFDLPVU͢Δ ✓SVO ✓ίϚϯυΛ࣮ߦ͢Δ ✓SFTUPSF@DBDIFTBWF@DBDIF ✓DPNQPTFSCVOEMFSΛຖճ͍ͬͯΔͱ࣌ؒ ͷΉͩͳͷͰɺదͳΩʔΛͬͯΩϟογϡ͢Δ ✓TUPSF@UFTU@SFTVMUTTUPSF@BSUJGBDUT ✓ςετ݁ՌΛ$*ͷ݁Ռදࣔʹөͤ͞Δ
DJSDMFDJDPOpHZNM version: 2 jobs: build: docker: - image: circleci/php:7.1-apache-browsers -
image: circleci/mysql:5.7 steps: - checkout - restore_cache: keys: - composer-{{ arch }}—{{ checksum "composer.lock" }} - run: composer install - save_cache: key: composer-{{ arch }}—{{ checksum "composer.lock" }} paths: - ~/.composer/cache - run: ./vendor/bin/phpcs —standard=PSR2 ./app - run: mkdir ~/phpunit - run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml - store_test_results: path: ~/phpunit - store_artifacts: path: ~/phpunit
SVO ✓ίϚϯυΛ࣮ߦ͢Δͷͩ ͕ɺ࣮ߦը໘Ͱදࣔ͢Δจࣈ ྻΛઃఆͰ͖Δ - run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml -
run: name: run tests command: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml - run: name: run tests command: | ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml
ෳͷ%PDLFSΠϝʔδΛ͏ ✓EPDLFSFYFDVUPSͷઃఆͰෳͷΠϝʔδΛࢦఆ͢Δ ✓ͭʹࢦఆͨ͠Πϝʔδ͕ϓϥΠϚϦΠϝʔδʹͳΓɺ TUFQTҎ߱ͷίϚϯυͦͷΠϝʔδʹର࣮ͯ͠ߦ͞ΕΔ ✓ͦͷଞͷίϯςφͷϓϩηεʹɺ ϙʔτ൪ ߸ ͰΞΫηεͰ͖Δ version: 2
jobs: build: docker: - image: php:7.1-apache - image: circleci/mysql:5.7 environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: test_app MYSQL_USER: test MYSQL_PASSWORD: test - image: redis:3.2
XPSLqPX ✓ෳͷδϣϒΛͲͷΑ͏ͳґଘؔ ॱ൪ Ͱ࣮ߦ͢Δ͔ΛఆٛͰ͖Δ ✓ྫ͑ɺQIQDTͰΤϥʔ͕ͳ͍ ߹ͷΈɺQIQVOJUΛΒ͍ͤͨͱ͔ ✓ܾ·ͬͨ࣌ؒʹδϣϒΛ࣮ߦ͢Δ ػೳ͋Δ
DJSDMFDJDPOpHZNM version: 2 jobs: phpcs: ... test: ... deploy: ...
workflows: version: 2 phpcs_test_deploy_workflow: jobs: - phpcs - test: requires: - phpcs - deploy filters: branches: only: - master requires: - test
DJSDMFDJDPOpHZNM version: 2 jobs: daily_job: ... workflows: version: 2 cron_workflow:
triggers: - schedule: cron: “0 18 * * *” filters: branches: only: - develop jobs: - daily_job
$JSDMF$* ✓ઃఆʹؔͯ͠ɺ࣮ߦ͍ͨ͠ίϚϯυ ΛSVOͰฒ͍͚͍͍͚ͯͩͳͷͰ ͦΜͳʹ͘͠ͳ͍ ✓ϩʔΧϧͰಈ࡞νΣοΫ͢Δ DJSDMFDJίϚϯυ͕४උ͞Ε͍ͯΔ ✓ඍົʹڍಈ͕͓͔͍͠ ✓XPSLqPXʹରԠͯ͠ͳ͍ɾɾɾ
$JSDMF$* ✓ಈ࡞Πϝʔδͱઃఆํ๏͕ Θ͔ͬͯ؊৺ͷ%PDLFS ͷ͜ͱ͕Θ͔Βͳ͍ͷͰɺͲ ͏ͨ͠Βྑ͍͔Θ͔Βͳ͍ ✓ͱ͍͏͜ͱͰɺ͔͜͜Β %PDLFSೖ
࣌ؒνΣοΫ ͜͜·Ͱ ͩͱྑ͍ͳɾɾɾ
%PDLFSͷқ ✓%PDLFSͷқஈ֊ʹ ͔ΕΔͷͰͳ͍͔ʁ ✓ୈҰஈ֊͞Ε͍ͯΔΠ ϝʔδΛར༻͢Δ͚ͩ ✓ୈೋஈ֊ࣗͰΠϝʔδΛ ࡞ͯͦ͠ΕΛར༻͢Δ
Πϝʔδ ✓%PDLFS)VCͱ͍͏࡞ࡁΈΠϝʔδ Λ͢Δॴ͕͋Δ ✓ͦ͜ʹͨ͘͞ΜͷΠϝʔδ͕ஔ͔Ε͍ͯ ΔͷͰͦΕΛར༻͢Δ͚ͩͰ͔ͳΓͷ͜ ͱ͕Ͱ͖Δ ✓ײ֮తʹCSFXJOTUBMMͰNZTRM ΛϩʔΧϧʹೖΕΔΈ͍ͨͳؾͰ͔ͭ͑ Δ
࣮ࡍʹͬͯΈΔ ✓1)1 BQBDIFΛ %PDLFSͰಈ͔ͯ͠ΈΔ ˞EPDLFSίϚϯυͷΦϓγϣϯ͕͓΅͑ΒΕΜͷΜ ͡Όʔͱ͍͏͝ҙݟʹಉҙ͠·͢ɻ͍͋͢͝Δͷ Ͱɾɾɾ docker container run
-it --rm -p 80:80 -v ~/Study/phpkansai/ demo/htdocs:/var/www/html php:7.1-apache
Πϝʔδ ✓ͨͩ͠ɺࣗͷ༻్ʹશʹ߹க͍ͯ͠ΔͱݶΒͳ͍ ✓ྫ͑ɺ1)1ͷΦϑΟγϟϧΠϝʔδʹJOUM֦ு YEFCVHೖͬͯͳ͍ ✓ΦϑΟγϟϧΠϝʔδ͋Δఔ৴༻Ͱ͖Δ͕ɺྑΠϝʔ δجຊతʹ৴༻Ͱ͖ͳ͍ ✓͍ͭ࠷ۙɺ%PDLFS)VCͰ͞Ε͍ͯͨΠϝʔδʹʮ҉ ߸௨՟࠾۷Ϙοτʯ͕ೖ͍ͬͯͨ͜ͱ͕χϡʔεʹͳͬͯͨ ✓IUUQTKQUFDIDSVODIDPN UBJOUFEDSZQUP
NJOJOHDPOUBJOFSTQVMMFEGSPNEPDLFSIVC
ͳΒࣗͰͭ͘Ζ͏ ✓%PDLFSΠϝʔδΛࣗͰͭ͘Ζ͏ͱ ͢ΔͱҎԼͷ͕ࣝඞཁ ✓%PDLFSࣗମͷཧղ ✓-JOVYσΟετϦϏϡʔγϣϯͷཧղ ✓ZVNͱ͔BQUͱ͔ ✓-JOVYίϚϯυͷཧղ ✓֤ιϑτΣΞͷNBLFํ๏ͷཧղ
ٸʹϋʔυϧ͕͕͋Δ ✓ઌఔ͍͕ͬͨɺ%PDLFS)VCͰΦϑΟγϟϧΠ ϝʔδ͕͞Ε͍ͯΔ ✓͋ΘͤͯΠϝʔδΛ࡞͢ΔͱͱͳΔ%PDLFSpMF ͕ެ։͞Ε͍ͯΔͷ͕͋Δ ✓ެ։͞Ε͍ͯΔ%PDLFSpMFΛΈΔ͚ͩͰ͔ͳΓ ͷ͕ࣝಘΒΕΔ ✓ͳͷͰ࠷ॳΦϑΟγϟϧΠϝʔδΛݩʹɺখมߋͨ͠ ΠϝʔδΛ࡞Δͱ͜Ζ͔Β࢝ΊΔͷ͕͍͍ ✓1)1ͷΦϑΟγϟϧΠϝʔδʹYEFCVH֦ுΛ͍
Ε͚ͨͩͷΠϝʔδΛ࡞Δͱ͔
ࣗͰΠϝʔδΛ࡞ΔϝϦοτ ✓ྫ͑ɺ$JSDMS$*Ͱɺ1)1ͷΦϑΟ γϟϧΠϝʔδΛͦͷ··͏ͱɺຖճ$* Λճͨ͢ͼʹJOUM֦ுΛೖΕΔॲཧΛ ΒͤΔඞཁ͕͋Δ ✓$*ͷ͕࣌ؒ৳ͼΔ ✓༧ΊJOUM֦ு͕ೖͬͨΠϝʔδΛ࡞ͬͯ ͓͚ɺͦͷ͚࣌ؒͩ$*ͷ͕࣌ؒॖͰ ͖Δ
%PDLFSʹ͍ͭͯ ✓ࠓճͷηογϣϯͰΑ͘Θ͔ΒΜ͔ͬͨ ํɺͥͻͱ͘͞ΒΠϯλʔωοτॴଐ ͷલဠ͞ΜͷࢿྉΛࢀর͍ͯͨͩ͘͠ͷ͕ ͍͍͔ͱࢥ͍·͢ ✓લဠ͞Μͷࢿྉ%PDLFSʹֶ͍ͭͯͿ ͷʹ࠷దͩͱࢥ͍·͢ ࢲେม͓ੈʹ ͳ͓ͬͯΓ·͢
✓IUUQTXXXTMJEFTIBSFOFU[FNCVUTV
ϚϯΨͰΘ͔Δ%PDLFS ✓ື͍͋͞Μ͕ϚϯΨͰΘ͔Δ %PDLFSͱ͍͏ࢠΛॻ͔Εͯ·͢ ✓͜Εଓ͖Ͱࠓޙଓ͘Έ͍ͨ ͳͷͰ͜Ε͔Β࢝ΊΑ͏ͱ͍͏ํʹ ͪΐ͏Ͳ͍͍͔ʂ ✓IUUQTOPUFNV MMNJOBUPMMOOGECFGGD
ͯ͞ɺ%PDLFSͱ ✓%PDLFSࣾ چEPU$MPVE Λத৺ʹΦʔ ϓϯιʔεͱͯ͠։ൃ͞Ε͍ͯΔίϯςφ ܕԾԽٕज़ ✓ͷय़ʹόʔδϣϯͷ͚ํ͕มߋ ͞Εͯɺ%PDLFS$&ͱ͍ͬͨܗ ʹͳͬͨ ✓ͦΕ·Ͱɺ%PDLFSΈ͍ͨͳ
ײͩͬͨ͡
7.ͱͷҧ͍ ✓7.࣮ࡍͷϋʔυΣΞ ΛΤϛϡϨʔγϣϯ͠ɺͦͷ্ Ͱ࣮ࡍͷ04ΛՔಇͤ͞Δ ✓ίϯςφܕԾԽٕज़Ͱɺ طʹಈ͍͍ͯΔ04ͷϦιʔεΛ ͬͯɺ৽ͨͳڥΛىಈ͢Δ
7.ͱͷҧ͍ )8 04 )ZQFSWJTPS )8 )8 04 04 "QBDIF 3FEJT
1)1 "QQT )8 04 .Z42- 7. )8 04 %PDLFS&OHJOF "QBDIF 3FEJT 1)1 "QQT .Z42- %PDLFS
Կ͕خ͍͠ͷʁ ✓ىಈ͕͍࣌ؒ ✓Ծ)8͓Αͼ04ͷى ಈ෦͕ͳ͍ ✓ফඅϦιʔε͕গͳ͍
%PDLFSͷಈ࡞ Registry image container docker image pull docker image push
docker container run docker container commit Dockerfile docker image build docker container exec
3FHJTUSZͱ ✓%PDLFS)VCͷΑ͏ʹɺ%PDLFSΠϝʔδΛ͢Δ ͷΛ3FHJTUSZͱ͍͏ ✓%PDLFS)VC%PDLFS͕ࣾӡӦ͍ͯ͠Δ3FHJTUSZ ✓"84ʹ&$3ɺ(PPHMF$MPVEʹ($3ͱ͍͏ 3FHJTUSZ͕͋Δ ✓%PDLFS)VCͰ͞ΕͯΔͷ ✓$FOU04VCVOUVͷ04ͷΠϝʔδ ✓1)13VCZͷݴޠؚ͕·ΕΔΠϝʔδ ✓&MBTUJD4FBSDI5FOTPS'MPXͷιϑτΣΞؚ͕
·ΕΔΠϝʔδ
࣮ࡍͲ͏͏ͷ͔ʁ ✓%PDLFS)VC͔Β%PDLFSΠϝʔδΛऔಘ͢Δ ✓औಘͨ͠ΠϝʔδΛ࣮ߦ͢Δͱ࣮ߦڥίϯςφ ͱͯ͠ಈ࡞͢Δ ✓7.ͱҧͬͯɺ࣮ߦΛऴྃ͢Δͱίϯςφʹର͢Δ มߋഁغ͞ΕΔ ✓࣮ߦ͢Δͨͼʹಉ͡ঢ়ଶ͔Βಈ࡞͢Δ ✓ͦΕͰࠔΔ߹ ·͊ɺ΄ͱΜͲ͕ͩ ɺϩʔΧ
ϧͷϑΝΠϧγεςϜΛϚϯτͯͦ͜͠ʹσʔλ ΛӬଓԽ͢Δ
Πϝʔδͱίϯςφ ✓࠷ॳΑͬͪ͘͝ΌʹͳΔ ✓%PDLFSΛ֮͑Δࡍͷ࠷ॳͷϋʔ υϧ ✓࣮ࡍʹಈ͔ͯ͠ײ֮Λ֮͑Δ ✓1)1ͱ1)1ͷΠϝʔδ Λऔಘͯ͠ίϯςφΛಈ͔ͯ͠ΈΔ
ࣗͰJNBHFΛCVJME ✓%PDLFS)VCͰ͞Ε͍ͯΔΠϝʔδ ΛݩʹಠࣗʹΧελϚΠζͨ͠ΠϝʔδΛ࡞ ͢Δ ✓%PDLFS)VCͰ͞Ε͍ͯΔ1)1ͷΠ ϝʔδ൚༻తͳͷͰɺྫ͑JOUM֦ு ೖ͍ͬͯͳ͍ͷͰɺ࠷ۙͷϑϨʔϜϫʔΫΛಈ ͔ͦ͏ͱ͢ΔͱɺಠࣗCVJME͢Δඞཁ͕͋Δ ✓ͦ͏͍ͬͨ߹ʹ͏ͷ͕%PDLFSpMF
Ξϯνύλʔϯ ✓طʹ7BHSBOU BOTJCMFͷڥ͕͋Δ߹ʹɺ %PDLFSΠϝʔδͷ࡞ʹBOTJCMFͷϓϨΠϒοΫ Λ͑ͳ͍͔ࢼ͢ ✓·ΔͷͰΊͨ΄͏͕͍͍ ✓গͳ͘ͱࢲ·ͬͨ ✓Ͳͬͪʹ͕͋ͬͯಈ͔ͳ͍ͷ͔Θ͔Βͳ͘ͳΔ ✓ૉʹ%PDLFSpMF͔Β࡞Δํ๏Λ࠷ॳʹशಘ͠ ·͠ΐ͏
✓BOTJCMFͱͷΈ߹ΘͤΛࢼ͢ͷͦͷޙͰ͍͍
%PDLFSpMF ✓'30.36/"%%$01:ͷগͷ ίϚϯυΛͬͯɺΠϝʔδΛ࡞͢Δखॱ Λࣔ͢ϑΝΠϧ ✓ඞཁͳࣝͱͯ͠TIεΫϦϓτΛॻ͘ ײ͡ ✓࣮ߦ͍ͯ͘͠ίϚϯυΛॱ൪ʹهड़ͯ͠ ͍͘ײ͡ ✓͜ͷϑΝΠϧΛݩʹΠϝʔδΛCVJME͢Δ
%PDLFSpMFͱCVJMEํ๏ FROM php:7.2-cli RUN pecl install xdebug-2.6.0 \ && docker-php-ext-enable
xdebug docker build -t kunit/php:7.2-cli . docker run -it --rm kunit/php:7.2-cli php -v docker run -it --rm php:7.2-cli php -v
͜Θ͘ͳ͍Αʂ ✓$JSDMF$*%PDLFS ͳΕΔͱͱͯศར ✓ಛʹ%PDLFSؔ࿈ͷٕज़ ࠓޙͲΜͲΜ্͕ͬ ͍ͯ͘ͱࢥ͏ͷͰ͜ΕΛػձ ʹ֮͑Δͷ͕͍͍ͱࢥ͏
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠