Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Docker on Heroku のはじめ方


Published on

Heroku でも Docker が動かせる!

PaaS である Heroku は、git repository に pushされたソースコードを元に、SLUG と呼ばれるイメージを作成して、それを Linux 上のコンテナで実行しています。
これとは別に、Docker イメージも解釈して、Heroku 上で稼働させることができます。その手順と注意事項について説明しています。

Published in: Technology

Docker on Heroku のはじめ方

  1. 1. Docker on Heroku Heroku Docker ​Takashi Abe @ Platform Specialist
  2. 2. Forward-Looking Statements ​Statement under the Private Securities Litigation Reform Act of 1995: ​This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. ​The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. ​Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available., inc. assumes no obligation and does not intend to update these forward-looking statements.
  3. 3. 自 己 紹 介 (Takashi Abe) Platform Specialist (@sho7650) à HW à à IT à : Perfume/BABYMETAL/ /
  4. 4. Heroku
  5. 5. Platform as a Service DBMS OS DBMS OS IaaS (Infrastructure as a Service) DBMS OS SaaS (Software as a Service) / DBMS OS PaaS (Platform as a Service) 24 /365 IaaS
  6. 6. Dyno Dyno Data Add-onsPayments Email SMS Search Analytics Monitoring Logging Ruby Node.js Java Python PHP Scala Clojure Postgres Redis Kafka Heroku The Twelve Factor App
  7. 7. → CI/CD • Git / Github • Pipeline > > • • Fork
  8. 8. / 項⽬ 説明 Private Spaces • DynoやDataなど、Herokuのアプリ実⾏環境をネット ワーク的に分離された環境に構築 • ⽇本国内のデータセンター利⽤も可能 エンタープライズ サポート • 技術的な質問やトラブル時のサポートチケットに対して、 重要度に応じた応答時間のSLAを提供 • ⽇本語でのサポート対応を提供 • 導⼊時のアーキテクチャデザインやAdd-on選定といった ご相談に⽇本⼈技術者が対応 Heroku Connect • Salesforceのオブジェクトとの双⽅向データ同期機能を 提供 Private Spaces Heroku Connect Postgres Heroku Salesforce
  9. 9. Container Registry & Runtime ​Heroku Docker Registry Heroku Docker !!
  10. 10. Docker Heroku 1. Heroku 2. Heroku CLI 3. docker buildpack ではなく、docker イメージでランタイムや ミドルウェアを開発者が準備できるので、これまで docker を利⽤していた開発者でも容易にデプロイが!
  11. 11. Heroku Docker ​Heroku !! 起動確認デプロイアドオン追加Herokuアプリ追加Docker アプリ準備 アプリ開発 git clone アプリ準備 heroku create データベース ログ出⼒ 監視ツール ファイル保管 などなど : container:push heroku logs 170以上!?
  12. 12. ​ “heroku container:push” ※ heroku login heroku container:login 起動確認デプロイアドオン追加Herokuアプリ追加事前準備 heroku create heroku addons:create heroku container:push heroku open heroku アプリの作成と アドオン追加は、⼀度の 実⾏でOK Heroku のアドオンも Docker から利⽤可能 ‘heroku-docker’ “heroku docker”
  13. 13. Dockerfile • $PORT Listen • Network link • Default working directory ‘/’ ‘WORKDIR’ • ‘CMD’ ENTRYPOINT • ‘VOLUME’ ‘EXPOSE’ ‘STOPSIGNAL’ ‘SHELL’ ‘HEALTHCHECK’ $PORT Web
  14. 14. Heroku • Dyno 24 +α • 24 • • • Web 30 • Worker Dyno • Twelve Factor App( ​Heroku 詳しくはこちらへどうぞ!!
  15. 15. DEMO ​
  16. 16. Japan Heroku User Group ​
  17. 17. 次のステップへ...Trailhead Heroku Enterpriseの基礎 Heroku Enterpriseをいつ どのように使⽤するかに ついての基礎を学習します SalesforceとHerokuの インテグレーション Herokuのアプリケーションを Salesforceに統合するための パターンと⽅法を学びます
  18. 18. Appendix ​Heroku References
  19. 19. Heroku • Heroku Heroku CLI • Heroku – Heroku Dev Center • Heroku • Heroku (Heroku Getting Started ) • Node.js Heroku • Ruby Heroku • Heroku - Java • PHP Heroku • Python Heroku • Heroku CI/CD