SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Docker Basics & Alfresco Content Services
sujaypillaiOrder Of The Bee
Learn. Connect. Collaborate.
Agenda
§ Best practices working with Docker
§ Docker Hands on Lab
§ Standard installer Vs Docker images deployment (docker-compose)
§ Demo – Alfresco deployment using docker-compose for local
development
Best Practices Working With
Docker
Learn. Connect. Collaborate.
1. Package A Single Application Per Container
Learn. Connect. Collaborate.
2. Handle Pid1, Signal Handling And Zombie Process
§ Docker sends Linux signals to your application inside the container to
stop it
§ PID 1 receives this signal
§ For your application to be stopped gracefully when needed, you need to
properly handle those signals
Learn. Connect. Collaborate.
3. Optimize For The Docker Build Cache
§ Image layers are cached which helps to accelerate later builds
FROM python:3.5
COPY my_code/ /src
RUN pip install my_requirements
FROM python:3.5
RUN pip install my_requirements
COPY my_code/ /src
Learn. Connect. Collaborate.
4. Remove Unecessary Tools
§ Remove everything that the application doesn’t need from your container
§ Include just your application in a distroless or scratch image
Learn. Connect. Collaborate.
5. Build The Smallest Image Possible
§ Benefits:
§ Decreases download times,
§ Reduces cold start times
§ Reduces disk usage
§ Strategies:
§ Start with a minimal base image
§ Leverage common layers between images
§ Make user of Docker’s multi-stage build feature
Learn. Connect. Collaborate.
Multi-stage build
Learn. Connect. Collaborate.
6. Properly Tag Your Images
§ Tags are how the users choose which version of your image they want to
use
§ 2 ways to tag images:
§ Semantic Versioning
§ Using Git commit hash of your application
§ Be careful while using “latest” tag
Learn. Connect. Collaborate.
7. Carefully consider whether to use a public image
§ Never ever use a public image in production environment
§ Malicious images reported on docker hub recently
§ Docker hub deleted account - docker123321
Reference Article:
https://kromtech.com/blog/security-center/cryptojacking-invades-cloud-how-modern-
containerization-trend-is-exploited-by-attackers
https://github.com/docker/hub-feedback/issues/1554
Learn. Connect. Collaborate.
8. Other considerations
§ Try not to use databases in containers
§ No root users
Learn. Connect. Collaborate.
Docker tips and tricks for Alfresco Administration
# Docker Postgres backup
docker run -i -e PGPASSWORD=[POSTGRESQL_PASSWORD] postgres /usr/bin/pg_dump 
-h [POSTGRESQL_HOST] 
-U [POSTGRESQL_USER] [POSTGRESQL_DATABASE] | gzip -9 > backup.sql.gz
# Docker Postgres Restore
gunzip < backup.sql.gz | docker exec -i [POSTGRESQL_CONTAINER] 
/bin/bash -c "export PGPASSWORD=[POSTGRESQL_PASSWORD] 
&& /usr/bin/psql -U [POSTGRESQL_USER] [POSTGRESQL_DATABASE]"
Docker Hands On Lab
Learn. Connect. Collaborate.
Instructions:
§ All the lab materials can be found at –
https://github.com/sujaypillai/alfrescodevcon2019
§ Get registered at DockerHub (if you don’t have a
docker hub account) –
https://hub.docker.com
§ Login using your above DockerHub account to
execute the lab materials at –
https://labs.play-with-docker.com/
Standard Installation
Vs
Docker Images deployment
Learn. Connect. Collaborate.
Alfresco Content Services (5.x) ships with three installers:
§ Alfresco Content Services Installer
§ Alfresco Content Services Platform Installer
§ Alfresco Share Installer
Learn. Connect. Collaborate.
Alfresco Content Services 6.0
§ Two main options for deploying Alfresco Content Services:
§ Using containerized deployment (preferred way going forward)
§ Using the distribution zip
§ Production deployment – Kubernetes
§ Test/Dev deployment – Docker compose
§ Use standard war files from distribution zip
Learn. Connect. Collaborate.
Alfresco Content Services Packaging
§ Github projects for Alfresco Content Services packaging:
§ Community - https://github.com/Alfresco/acs-community-packaging
§ Enterprise - https://github.com/Alfresco/acs-packaging
§ Github projects for Alfresco Content Services deployment:
§ Community - https://github.com/Alfresco/acs-community-deployment
§ Enterprise - https://github.com/Alfresco/acs-deployment
Learn. Connect. Collaborate.
Contents of the deployment (community)
1. Alfresco repository for community with
1.1. Alfresco Share Services AMP
1.2. Alfresco AOS AMP
1.3. Alfresco vti-bin war - helps with AOS integration
1.4. Alfresco Google Docs Repo AMP
2. Alfresco Share with
2.1 Alfresco Google Docks Share AMP
3. Postgres DB
4. Alfresco Search Services
5. Alfresco Transform Services*
6. Alfresco Digital Workspace*
*Only available in Enterprise
Demo
Thank You!!!

Contenu connexe

Tendances

Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
Patrick Mizer
 

Tendances (20)

Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Dockerizing Windows Server Applications by Ender Barillas and Taylor BrownDockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
 
A Survey of Container Security in 2016: A Security Update on Container Platforms
A Survey of Container Security in 2016: A Security Update on Container PlatformsA Survey of Container Security in 2016: A Security Update on Container Platforms
A Survey of Container Security in 2016: A Security Update on Container Platforms
 
Docker serverless v1.0
Docker serverless v1.0Docker serverless v1.0
Docker serverless v1.0
 
TIAD 2016 : Migrating 100% of your production services to containers
TIAD 2016 : Migrating 100% of your production services to containersTIAD 2016 : Migrating 100% of your production services to containers
TIAD 2016 : Migrating 100% of your production services to containers
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
 
Docker 1.9 Feature Overview
Docker 1.9 Feature OverviewDocker 1.9 Feature Overview
Docker 1.9 Feature Overview
 
Continuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in CloudContinuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in Cloud
 
Docker orchestration
Docker orchestrationDocker orchestration
Docker orchestration
 
Container Days Boston - Kubernetes in production
Container Days Boston - Kubernetes in productionContainer Days Boston - Kubernetes in production
Container Days Boston - Kubernetes in production
 
On-Demand Image Resizing from Part of the monolith to Containerized Microserv...
On-Demand Image Resizing from Part of the monolith to Containerized Microserv...On-Demand Image Resizing from Part of the monolith to Containerized Microserv...
On-Demand Image Resizing from Part of the monolith to Containerized Microserv...
 
What’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, DockerWhat’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, Docker
 
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaSDockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
 
Deploying Symfony2 app with Ansible
Deploying Symfony2 app with AnsibleDeploying Symfony2 app with Ansible
Deploying Symfony2 app with Ansible
 
Online Meetup: Why should container system / platform builders care about con...
Online Meetup: Why should container system / platform builders care about con...Online Meetup: Why should container system / platform builders care about con...
Online Meetup: Why should container system / platform builders care about con...
 
Helm intro
Helm introHelm intro
Helm intro
 
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
 
How to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker BuildHow to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker Build
 
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and ChefScaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
 
Comprehensive Monitoring for Docker
Comprehensive Monitoring for DockerComprehensive Monitoring for Docker
Comprehensive Monitoring for Docker
 

Similaire à Docker Basics & Alfresco Content Services

Before & After Docker Init
Before & After Docker InitBefore & After Docker Init
Before & After Docker Init
Angel Borroy López
 

Similaire à Docker Basics & Alfresco Content Services (20)

DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday development
 
時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker Containers
 
Introducing docker
Introducing dockerIntroducing docker
Introducing docker
 
Docker workshop 0507 Taichung
Docker workshop 0507 Taichung Docker workshop 0507 Taichung
Docker workshop 0507 Taichung
 
手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
Docker Introduction.pdf
Docker Introduction.pdfDocker Introduction.pdf
Docker Introduction.pdf
 
Before & After Docker Init
Before & After Docker InitBefore & After Docker Init
Before & After Docker Init
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
Containers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech TalkContainers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech Talk
 
Perspectives on Docker
Perspectives on DockerPerspectives on Docker
Perspectives on Docker
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
手把手帶你學Docker 03042017
手把手帶你學Docker 03042017手把手帶你學Docker 03042017
手把手帶你學Docker 03042017
 
Streamline your development environment with docker
Streamline your development environment with dockerStreamline your development environment with docker
Streamline your development environment with docker
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Docker Basics & Alfresco Content Services

  • 1. Docker Basics & Alfresco Content Services sujaypillaiOrder Of The Bee
  • 2.
  • 3. Learn. Connect. Collaborate. Agenda § Best practices working with Docker § Docker Hands on Lab § Standard installer Vs Docker images deployment (docker-compose) § Demo – Alfresco deployment using docker-compose for local development
  • 5. Learn. Connect. Collaborate. 1. Package A Single Application Per Container
  • 6. Learn. Connect. Collaborate. 2. Handle Pid1, Signal Handling And Zombie Process § Docker sends Linux signals to your application inside the container to stop it § PID 1 receives this signal § For your application to be stopped gracefully when needed, you need to properly handle those signals
  • 7. Learn. Connect. Collaborate. 3. Optimize For The Docker Build Cache § Image layers are cached which helps to accelerate later builds FROM python:3.5 COPY my_code/ /src RUN pip install my_requirements FROM python:3.5 RUN pip install my_requirements COPY my_code/ /src
  • 8. Learn. Connect. Collaborate. 4. Remove Unecessary Tools § Remove everything that the application doesn’t need from your container § Include just your application in a distroless or scratch image
  • 9. Learn. Connect. Collaborate. 5. Build The Smallest Image Possible § Benefits: § Decreases download times, § Reduces cold start times § Reduces disk usage § Strategies: § Start with a minimal base image § Leverage common layers between images § Make user of Docker’s multi-stage build feature
  • 11. Learn. Connect. Collaborate. 6. Properly Tag Your Images § Tags are how the users choose which version of your image they want to use § 2 ways to tag images: § Semantic Versioning § Using Git commit hash of your application § Be careful while using “latest” tag
  • 12. Learn. Connect. Collaborate. 7. Carefully consider whether to use a public image § Never ever use a public image in production environment § Malicious images reported on docker hub recently § Docker hub deleted account - docker123321 Reference Article: https://kromtech.com/blog/security-center/cryptojacking-invades-cloud-how-modern- containerization-trend-is-exploited-by-attackers https://github.com/docker/hub-feedback/issues/1554
  • 13. Learn. Connect. Collaborate. 8. Other considerations § Try not to use databases in containers § No root users
  • 14. Learn. Connect. Collaborate. Docker tips and tricks for Alfresco Administration # Docker Postgres backup docker run -i -e PGPASSWORD=[POSTGRESQL_PASSWORD] postgres /usr/bin/pg_dump -h [POSTGRESQL_HOST] -U [POSTGRESQL_USER] [POSTGRESQL_DATABASE] | gzip -9 > backup.sql.gz # Docker Postgres Restore gunzip < backup.sql.gz | docker exec -i [POSTGRESQL_CONTAINER] /bin/bash -c "export PGPASSWORD=[POSTGRESQL_PASSWORD] && /usr/bin/psql -U [POSTGRESQL_USER] [POSTGRESQL_DATABASE]"
  • 16. Learn. Connect. Collaborate. Instructions: § All the lab materials can be found at – https://github.com/sujaypillai/alfrescodevcon2019 § Get registered at DockerHub (if you don’t have a docker hub account) – https://hub.docker.com § Login using your above DockerHub account to execute the lab materials at – https://labs.play-with-docker.com/
  • 18. Learn. Connect. Collaborate. Alfresco Content Services (5.x) ships with three installers: § Alfresco Content Services Installer § Alfresco Content Services Platform Installer § Alfresco Share Installer
  • 19. Learn. Connect. Collaborate. Alfresco Content Services 6.0 § Two main options for deploying Alfresco Content Services: § Using containerized deployment (preferred way going forward) § Using the distribution zip § Production deployment – Kubernetes § Test/Dev deployment – Docker compose § Use standard war files from distribution zip
  • 20. Learn. Connect. Collaborate. Alfresco Content Services Packaging § Github projects for Alfresco Content Services packaging: § Community - https://github.com/Alfresco/acs-community-packaging § Enterprise - https://github.com/Alfresco/acs-packaging § Github projects for Alfresco Content Services deployment: § Community - https://github.com/Alfresco/acs-community-deployment § Enterprise - https://github.com/Alfresco/acs-deployment
  • 21. Learn. Connect. Collaborate. Contents of the deployment (community) 1. Alfresco repository for community with 1.1. Alfresco Share Services AMP 1.2. Alfresco AOS AMP 1.3. Alfresco vti-bin war - helps with AOS integration 1.4. Alfresco Google Docs Repo AMP 2. Alfresco Share with 2.1 Alfresco Google Docks Share AMP 3. Postgres DB 4. Alfresco Search Services 5. Alfresco Transform Services* 6. Alfresco Digital Workspace* *Only available in Enterprise
  • 22. Demo