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.5k
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
540
Google App Engine PHP 7.2 を試してみる #phpstudy / google app engine php 7.2
kunit
1
890
独立したコアレイヤパターンをためしてみる / try independent core layer pattern
kunit
3
890
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
640
Docker for Mac/Winってどうなの? / #fukuokaphp docker for mac and win
kunit
0
190
Other Decks in Technology
See All in Technology
[RSJ24] Task Success Prediction for Open-Vocabulary Manipulation Based on Multi-Level Aligned Representations
keio_smilab
PRO
0
230
エンジニア向け会社紹介資料
caddi_eng
15
250k
LandingZoneAccelerator と学ぶ 「スケーラブルで安全なマルチアカウントAWS環境」と 私たちにもできるベストプラクティス
maimyyym
1
110
Eventual Detection Engineering
ken5scal
0
890
ビジネスとエンジニアリングを繋ぐプロダクトを中心とした組織づくりの実践
sansantech
PRO
1
120
リクルート新人研修2024 テキスト生成AI活用
recruitengineers
PRO
10
450
Building Static Websites with Sculpin
opdavies
0
1.5k
20分で分かるIAM全機能 (拡大版) / 20240903-jawsug-yokohama-iam
opelab
3
120
Dive Deep in Cloud Run: Automatic Base Image update
aoto
PRO
0
900
四国クラウドお遍路 2024 in 高知 オープニング
yukataoka
0
110
Staff Engineer / 20240827 Yuichiro Masui
shift_evolve
0
160
株式会社M2X エンジニアチーム紹介資料
m2xsoftware
0
380
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
22
3.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
GraphQLの誤解/rethinking-graphql
sonatard
65
9.7k
Speed Design
sergeychernyshev
18
400
Agile that works and the tools we love
rasmusluckow
327
20k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Fontdeck: Realign not Redesign
paulrobertlloyd
80
5.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
122
18k
Robots, Beer and Maslow
schacon
PRO
157
8.1k
Clear Off the Table
cherdarchuk
90
320k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
25
1.3k
Large-scale JavaScript Application Architecture
addyosmani
508
110k
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ؔ࿈ͷٕज़ ࠓޙͲΜͲΜ্͕ͬ ͍ͯ͘ͱࢥ͏ͷͰ͜ΕΛػձ ʹ֮͑Δͷ͕͍͍ͱࢥ͏
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠