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.5k
Webアプリケーションエンジニアだった私がホスティング事業に興味を持った理由 / Fukuoka UIJ Turn gmo pepabo
kunit
0
460
アプリケーションエンジニアな私がホスティング業界に来て感じたあれこれ / ChugokuDB Vol27
kunit
0
570
Google App Engine PHP 7.2 を試してみる #phpstudy / google app engine php 7.2
kunit
1
930
独立したコアレイヤパターンをためしてみる / try independent core layer pattern
kunit
3
950
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
680
Docker for Mac/Winってどうなの? / #fukuokaphp docker for mac and win
kunit
0
210
Other Decks in Technology
See All in Technology
2週に1度のビッグバンリリースをデイリーリリース化するまでの苦悩 ~急成長するスタートアップのリアルな裏側~
kworkdev
PRO
8
5.5k
Asset Centric な データ変換パイプラインの攻略法
recruitengineers
PRO
1
100
GraphRAG: What I Thought I Knew (But Didn’t)
sashimimochi
0
110
信頼性を支えるテレメトリーパイプラインの構築 / Building Telemetry Pipeline with OpenTelemetry
ymotongpoo
9
4.1k
SREとしてスタッフエンジニアを目指す / SRE Kaigi 2025
tjun
14
4.7k
20250129 Findy_テスト高活用化
dshirae
0
110
Platform EngineeringがあればSREはいらない!? 新時代のSREに求められる役割とは
mshibuya
2
3.2k
論文紹介 ”Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG” @GDG Tokyo
shukob
0
230
横断SREの立ち上げと、AWSセキュリティへの取り組みの軌跡
rvirus0817
3
3.6k
AIアプリケーション開発でAzure AI Searchを使いこなすためには
isidaitc
1
250
あなたの興味は信頼性?それとも生産性? SREとしてのキャリアに悩むみなさまに伝えたい選択肢
jacopen
5
2k
Site Reliability Engineering on Kubernetes
nwiizo
6
3.6k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
The Cult of Friendly URLs
andyhume
78
6.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
980
Being A Developer After 40
akosma
89
590k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Facilitating Awesome Meetings
lara
51
6.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
A better future with KSS
kneath
238
17k
Why Our Code Smells
bkeepers
PRO
335
57k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
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ؔ࿈ͷٕज़ ࠓޙͲΜͲΜ্͕ͬ ͍ͯ͘ͱࢥ͏ͷͰ͜ΕΛػձ ʹ֮͑Δͷ͕͍͍ͱࢥ͏
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠