SlideShare uma empresa Scribd logo
1 de 16
No more Dockerfiles?
Buildpacks to help
you ship your image!
Confoo February 22nd 2024
Anthony Dahanne
Software Engineer at VMware by Broadcom
@anthonydahanne@framapiaf.org
https://blog.dahanne.net
2
Agenda
• What are buildpacks?
• Compare some use cases with Dockerfiles
• Buildpacks usage
Picture Placehlder Picture
Placeholder
Picture
Placeholder
https://github.com/anthonydahanne
Montreal JUG co-lead
Your presenter for this session
Java and Go developer, Cloud architect, Devops guy… But also community leader!
blog.dahanne.net
@anthonydahanne@framapiaf.or
g
Devoxx4kids QC co-lead CNCF Eastern Canada co-organizer
4
What are buildpacks?
Detect and build!
Python Buildpack ⚙️
NodeJS Buildpack ⚙️
Java Buildpack ⚙️
java –jar my-app.jar
node server.js
python3 server.py
5
What are buildpacks?
Many iterations across the years!
https://buildpacks.io
2011 2014’ish 2018
6
What are buildpacks?
Heroku the OG
7
What are buildpacks?
Cloud Foundry: the open-source PaaS
8
What are Cloud Native buildpacks?
Detect and build an OCI image!!
Where do they come from?
A spec and CLI under the CNCF umbrella
https://buildpacks.io
https://github.com/buildpacks
10
Where do they come from?
Basically 3 big implementers
What’s a Paketo?
OSS buildpacks implementations
https://paketo.io
https://github.com/paketo-buildpacks
12
Why Paketo buildpacks over … the Dockerfile?
Benefit from maintainers expertise
FROM openjdk
COPY target/*runner.jar /app/app-runner.jar
WORKDIR /app
EXPOSE 8080
ENTRYPOINT [ "java","-jar" ]
CMD ["app-runner.jar"]
java –jar app-runner.jar
pack build my-app
--builder paketobuildpacks/builder-jammy-base
Setting Active Processor Count to 5
Calculating JVM memory based on 15788052K available memory
Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -
Xmx15397353K -XX:MaxMetaspaceSize=83498K -
XX:ReservedCodeCacheSize=240M -Xss1M (Total Memory: 15788052K,
Thread Count: 50, Loaded Class Count: 12328, Headroom: 0%)
Enabling Java Native Memory Tracking
Adding 137 container CA certificates to JVM truststore
Spring Cloud Bindings Enabled
Picked up JAVA_TOOL_OPTIONS: -
Djava.security.properties=/layers/paketo-buildpacks_bellsoft-
liberica/java-security-properties/java-security.properties -
XX:+ExitOnOutOfMemoryError -XX:ActiveProcessorCount=5 -
XX:MaxDirectMemorySize=10M -Xmx15397353K -
XX:MaxMetaspaceSize=83498K -XX:ReservedCodeCacheSize=240M -Xss1M -
XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=summary -
XX:+PrintNMTStatistics -
Dorg.springframework.cloud.bindings.boot.enable=true
13
Why Paketo buildpacks over … the Dockerfile?
Benefit from the ecosystem for common use cases : custom CA certificate
FROM openjdk
WORKDIR /app
COPY custom-ca.crt /app
RUN keytool -importcert -file custom-
ca.crt -alias custom-ca.crt -cacerts -
storepass changeit -noprompt
EXPOSE 8080
ENTRYPOINT [ "java","-jar" ]
CMD ["app-runner.jar"]
FROM golang:1.15 AS builder
RUN apk update
RUN apk add -U --no-cache ca-certificates && update-ca-
certificates
WORKDIR /GreetingAPI
COPY . /greeting
WORKDIR /greeting
ENV GO111MODULE=on
RUN CGO_ENABLED=0 GOOS=linux go build -o greeting
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt
/etc/ssl/certs/
COPY --from=builder /greeting .
CMD ["./greeting"]
pack build java-app
--volume $PWD/ca-certs/:/platform/bindings/my-
certs
--builder=paketobuildpacks/builder-jammy-base
pack build go-app
--volume $PWD/ca-certs/:/platform/bindings/my-certs
--builder=paketobuildpacks/builder-jammy-base
14
Why Paketo buildpacks over … the Dockerfile?
SBOM generation out of the box!
pack sbom download myapp --output-dir ./app-sbom
15
How to integrate them to my existing pipelines?
• They’re images pushed to a registry, so you can keep your existing workflow
• Spring Boot Maven / Gradle plugins
• Building images natively from Kubernetes, using kpack
• And many others…
 Github Actions
 Gitlab CI/CD
 CircleCI
 Tekton
 Skaffold
 PaaS : Heroku, Google Cloud, Tanzu Application Platform, etc.
 etc.
Thank You

Mais conteúdo relacionado

Semelhante a No more Dockerfiles? Buildpacks to help you ship your image!

Semelhante a No more Dockerfiles? Buildpacks to help you ship your image! (20)

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
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
 
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3
 
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzureDocker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
 
DCSF19 Docker Containers & Java: What I Wish I Had Been Told
DCSF19 Docker Containers & Java: What I Wish I Had Been ToldDCSF19 Docker Containers & Java: What I Wish I Had Been Told
DCSF19 Docker Containers & Java: What I Wish I Had Been Told
 
Kubernetes security
Kubernetes securityKubernetes security
Kubernetes security
 
Developing and deploying applications with Spring Boot and Docker (@oakjug)
Developing and deploying applications with Spring Boot and Docker (@oakjug)Developing and deploying applications with Spring Boot and Docker (@oakjug)
Developing and deploying applications with Spring Boot and Docker (@oakjug)
 
Couchbase on Docker - Couchbase Connect 2015
Couchbase on Docker - Couchbase Connect 2015Couchbase on Docker - Couchbase Connect 2015
Couchbase on Docker - Couchbase Connect 2015
 
Using Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous DeliveryUsing Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous Delivery
 
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2daysUsing Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Using docker to develop NAS applications
Using docker to develop NAS applicationsUsing docker to develop NAS applications
Using docker to develop NAS applications
 
Introduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunIntroduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud Run
 
Docker - Der Wal in der Kiste
Docker - Der Wal in der KisteDocker - Der Wal in der Kiste
Docker - Der Wal in der Kiste
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data Services
 
Deploy Deep Learning Application with Azure Container Instance - Devdays2018
Deploy Deep Learning Application with Azure Container Instance - Devdays2018Deploy Deep Learning Application with Azure Container Instance - Devdays2018
Deploy Deep Learning Application with Azure Container Instance - Devdays2018
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 

Mais de Anthony Dahanne

Confoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabledConfoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabled
Anthony Dahanne
 

Mais de Anthony Dahanne (17)

Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
Buildpacks: the other way to build container images
Buildpacks: the other way to build container imagesBuildpacks: the other way to build container images
Buildpacks: the other way to build container images
 
Tu changes d'emploi - retour d'experience d'un développeur
Tu changes d'emploi - retour d'experience d'un développeurTu changes d'emploi - retour d'experience d'un développeur
Tu changes d'emploi - retour d'experience d'un développeur
 
Java applications containerized and deployed
Java applications containerized and deployedJava applications containerized and deployed
Java applications containerized and deployed
 
Contribuer à la traduction française de kubernetes
Contribuer à la traduction française de kubernetesContribuer à la traduction française de kubernetes
Contribuer à la traduction française de kubernetes
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Kubernetes Java Operator
Kubernetes Java OperatorKubernetes Java Operator
Kubernetes Java Operator
 
Caching in applications still matters
Caching in applications still mattersCaching in applications still matters
Caching in applications still matters
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java Developers
 
Docker and java
Docker and javaDocker and java
Docker and java
 
Terracotta Ehcache : Simpler, faster, distributed
Terracotta Ehcache : Simpler, faster, distributedTerracotta Ehcache : Simpler, faster, distributed
Terracotta Ehcache : Simpler, faster, distributed
 
Docker and java, at Montréal JUG
Docker and java, at Montréal JUGDocker and java, at Montréal JUG
Docker and java, at Montréal JUG
 
Writing a Jenkins / Hudson plugin
Writing a Jenkins / Hudson pluginWriting a Jenkins / Hudson plugin
Writing a Jenkins / Hudson plugin
 
Confoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabledConfoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabled
 
Ci for-android-apps
Ci for-android-appsCi for-android-apps
Ci for-android-apps
 
Asynctasks
AsynctasksAsynctasks
Asynctasks
 

Último

Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Lisi Hocke
 

Último (20)

Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
[GRCPP] Introduction to concepts (C++20)
[GRCPP] Introduction to concepts (C++20)[GRCPP] Introduction to concepts (C++20)
[GRCPP] Introduction to concepts (C++20)
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 

No more Dockerfiles? Buildpacks to help you ship your image!

  • 1. No more Dockerfiles? Buildpacks to help you ship your image! Confoo February 22nd 2024 Anthony Dahanne Software Engineer at VMware by Broadcom @anthonydahanne@framapiaf.org https://blog.dahanne.net
  • 2. 2 Agenda • What are buildpacks? • Compare some use cases with Dockerfiles • Buildpacks usage
  • 3. Picture Placehlder Picture Placeholder Picture Placeholder https://github.com/anthonydahanne Montreal JUG co-lead Your presenter for this session Java and Go developer, Cloud architect, Devops guy… But also community leader! blog.dahanne.net @anthonydahanne@framapiaf.or g Devoxx4kids QC co-lead CNCF Eastern Canada co-organizer
  • 4. 4 What are buildpacks? Detect and build! Python Buildpack ⚙️ NodeJS Buildpack ⚙️ Java Buildpack ⚙️ java –jar my-app.jar node server.js python3 server.py
  • 5. 5 What are buildpacks? Many iterations across the years! https://buildpacks.io 2011 2014’ish 2018
  • 7. 7 What are buildpacks? Cloud Foundry: the open-source PaaS
  • 8. 8 What are Cloud Native buildpacks? Detect and build an OCI image!!
  • 9. Where do they come from? A spec and CLI under the CNCF umbrella https://buildpacks.io https://github.com/buildpacks
  • 10. 10 Where do they come from? Basically 3 big implementers
  • 11. What’s a Paketo? OSS buildpacks implementations https://paketo.io https://github.com/paketo-buildpacks
  • 12. 12 Why Paketo buildpacks over … the Dockerfile? Benefit from maintainers expertise FROM openjdk COPY target/*runner.jar /app/app-runner.jar WORKDIR /app EXPOSE 8080 ENTRYPOINT [ "java","-jar" ] CMD ["app-runner.jar"] java –jar app-runner.jar pack build my-app --builder paketobuildpacks/builder-jammy-base Setting Active Processor Count to 5 Calculating JVM memory based on 15788052K available memory Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M - Xmx15397353K -XX:MaxMetaspaceSize=83498K - XX:ReservedCodeCacheSize=240M -Xss1M (Total Memory: 15788052K, Thread Count: 50, Loaded Class Count: 12328, Headroom: 0%) Enabling Java Native Memory Tracking Adding 137 container CA certificates to JVM truststore Spring Cloud Bindings Enabled Picked up JAVA_TOOL_OPTIONS: - Djava.security.properties=/layers/paketo-buildpacks_bellsoft- liberica/java-security-properties/java-security.properties - XX:+ExitOnOutOfMemoryError -XX:ActiveProcessorCount=5 - XX:MaxDirectMemorySize=10M -Xmx15397353K - XX:MaxMetaspaceSize=83498K -XX:ReservedCodeCacheSize=240M -Xss1M - XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=summary - XX:+PrintNMTStatistics - Dorg.springframework.cloud.bindings.boot.enable=true
  • 13. 13 Why Paketo buildpacks over … the Dockerfile? Benefit from the ecosystem for common use cases : custom CA certificate FROM openjdk WORKDIR /app COPY custom-ca.crt /app RUN keytool -importcert -file custom- ca.crt -alias custom-ca.crt -cacerts - storepass changeit -noprompt EXPOSE 8080 ENTRYPOINT [ "java","-jar" ] CMD ["app-runner.jar"] FROM golang:1.15 AS builder RUN apk update RUN apk add -U --no-cache ca-certificates && update-ca- certificates WORKDIR /GreetingAPI COPY . /greeting WORKDIR /greeting ENV GO111MODULE=on RUN CGO_ENABLED=0 GOOS=linux go build -o greeting FROM scratch COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=builder /greeting . CMD ["./greeting"] pack build java-app --volume $PWD/ca-certs/:/platform/bindings/my- certs --builder=paketobuildpacks/builder-jammy-base pack build go-app --volume $PWD/ca-certs/:/platform/bindings/my-certs --builder=paketobuildpacks/builder-jammy-base
  • 14. 14 Why Paketo buildpacks over … the Dockerfile? SBOM generation out of the box! pack sbom download myapp --output-dir ./app-sbom
  • 15. 15 How to integrate them to my existing pipelines? • They’re images pushed to a registry, so you can keep your existing workflow • Spring Boot Maven / Gradle plugins • Building images natively from Kubernetes, using kpack • And many others…  Github Actions  Gitlab CI/CD  CircleCI  Tekton  Skaffold  PaaS : Heroku, Google Cloud, Tanzu Application Platform, etc.  etc.

Notas do Editor

  1. Other types of buildpacks exist: * https://repo2docker.readthedocs.io/en/latest/architecture.html / https://mybinder.org/ turns a Git repo of Jupyter notebooks into an executable env. *