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
940
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
200
Other Decks in Technology
See All in Technology
Bring Your Own Container: When Containers Turn the Key to EDR Bypass/byoc-avtokyo2024
tkmru
0
860
AWS re:Invent 2024 recap in 20min / JAWSUG 千葉 2025.1.14
shimy
1
100
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
1
16k
タイミーのデータ活用を支えるdbt Cloud導入とこれから
ttccddtoki
1
180
AWSマルチアカウント統制環境のすゝめ / 20250115 Mitsutoshi Matsuo
shift_evolve
0
120
dbtを中心にして組織のアジリティとガバナンスのトレードオンを考えてみた
gappy50
0
290
30分でわかる「リスクから学ぶKubernetesコンテナセキュリティ」/30min-k8s-container-sec
mochizuki875
3
450
Alignment and Autonomy in Cybozu - 300人の開発組織でアラインメントと自律性を両立させるアジャイルな組織運営 / RSGT2025
ama_ch
1
2.4k
Unsafe.BitCast のすゝめ。
nenonaninu
0
200
駆け出しリーダーとしての第一歩〜開発チームとの新しい関わり方〜 / Beginning Journey as Team Leader
kaonavi
0
120
AWSの生成AIサービス Amazon Bedrock入門!(2025年1月版)
minorun365
PRO
7
480
ドメイン駆動設計の実践により事業の成長スピードと保守性を両立するショッピングクーポン
lycorptech_jp
PRO
13
2.3k
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Visualization
eitanlees
146
15k
Practical Orchestrator
shlominoach
186
10k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
230
52k
Optimising Largest Contentful Paint
csswizardry
33
3k
4 Signs Your Business is Dying
shpigford
182
22k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Making the Leap to Tech Lead
cromwellryan
133
9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
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ؔ࿈ͷٕज़ ࠓޙͲΜͲΜ্͕ͬ ͍ͯ͘ͱࢥ͏ͷͰ͜ΕΛػձ ʹ֮͑Δͷ͕͍͍ͱࢥ͏
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠